login
A071640
a(n) = Sum_{i=1..n} A040051(i).
3
1, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 13, 13, 14, 15, 15, 15, 15, 15, 16, 16, 16, 17, 18, 18, 19, 20, 21, 22, 23, 23, 24, 24, 25, 26, 26, 26, 26, 27, 28, 28, 29, 30, 31, 32, 32, 33, 33, 33, 33, 34, 35, 35, 36, 36, 36, 36, 37, 38, 39, 39, 40, 41, 42, 42
OFFSET
1,3
COMMENTS
Does 2*a(n) > n for n>2? Cf. A086144. - Benoit Cloitre
No. First failure is at n = 6662. - Peter Luschny, Oct 05 2011
MAPLE
A071640 := proc(n) option remember; if n=1 then 1 else A071640(n-1)+
(combinat[numbpart](n) mod 2) fi end: # Peter Luschny, Oct 05 2011
MATHEMATICA
a[n_] := Sum[Mod[PartitionsP[i], 2], {i, 1, n}];
Array[a, 80] (* Jean-François Alcover, Jun 03 2019 *)
PROG
(PARI) a(n) = my(x='x+O('x^(n+1)), p = 1/eta(x)); sum(i=1, n, (1-(-1)^(polcoeff(p, i))))/2; \\ corrected by Michel Marcus, Jun 11 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 22 2002
STATUS
approved