Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 29694

The challenge involves mathematics. Also consider using more specific tags: [number] [number-theory] [arithmetic] [combinatorics] [graph-theory] [geometry] [abstract-algebra].

3
votes
Haskell -- 121 chars (newlines included) Here's a relatively simple Haskell solution that doesn't use any external modules and is golfed down as much as I could get it. a%1=[] a%n|n`mod`a<1=a:2%(n`d …
answered Aug 7 '14 by killmous
1
vote
Haskell, 286 bytes a#0|abs a==1=1|1<2=0 a#1=1 a#2|even a=0|mod a 8`elem`[1,7]=1|1<2=(-1) a#b|b<0=a`div`abs a*a#(-b)|all((/=0).mod b)[2..b-1]=if elem n[0,1] then n else(-1)|1<2=product$map(a#)$f b whe …
answered Dec 9 '15 by killmous