OFFSET
0,3
COMMENTS
The number of nonzero terms in the polynomial (1+x)^n (mod n). Note that n is prime iff a(n)=2. - T. D. Noe, Feb 23 2006
For n > 0: a(n) = number of terms > 0 in n-th row of triangle A053200. - Reinhard Zumkeller, Jan 24 2014
REFERENCES
J. H. Conway, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
MATHEMATICA
Prepend[ Array[ Length[ Select[ Table[ Binomial[ #, k ]/#, {k, 0, #} ], !IntegerQ[ # ]& ] ]&, 100 ], 1 ]
PROG
(Haskell)
a007012 n = a007012_list !! n
a007012_list = 1 : map (sum . map signum) (tail a053200_tabl)
-- Reinhard Zumkeller, Jan 24 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved