This is my first attempt at obfuscation, so obviously it's not very obfuscated. Any suggestions and tips are extraordinarily welcome.
#!/usr/local/bin/perl sub shady { $==(shift)-1, scalar split/ /, join ' ', map{$=|=$=>>$_} grep{$/=$$/=$$/$^F,!((log)/log($/))?1:int((log)/log($/))==((log)/log($ +/))} (1..24) and $==(pop)+1; } print shady(shift), "\n";
jynx

ps if you need help figuring it out just run it on command line and feed it numbers...

Update: oops, forgot the perl line (now included)