OFFSET
0,4
COMMENTS
A000009(n) is odd iff n is of the form k*(3*k - 1)/2 or k*(3*k + 1)/2. - Jonathan Vos Post, Jun 18 2005
Eric W. Weisstein comments: "The values of n for which A000009(n) is prime are 3, 4, 5, 7, 22, 70, 100, 495, 1247, 2072, 320397, ... (A035359). These values correspond to 2, 2, 3, 5, 89, 29927, 444793, 602644050950309, ... (A051005). It is not known if a(n) is infinitely often prime, but Gordon and Ono (1997) proved that it is 'almost always' divisible by any given power of 2 (1997)."
Semiprime values begin: a(5) = 15 = 3 * 5, a(11) = 4097 = 17 * 241, a(20) = 27342421 = 389 * 70289, a(24) = 1780751883 = 3 * 593583961, a(28) = 120742510607 = 31 * 3894919697. - Jonathan Vos Post, Jun 18 2005
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..600
Eric Weisstein's World of Mathematics, Partition Function Q Congruences
FORMULA
MAPLE
b:= proc(n) option remember; `if`(n=0, 1, add(b(n-j)*add(
`if`(d::odd, d, 0), d=numtheory[divisors](j)), j=1..n)/n)
end:
a:= n-> b((m->m*(3*m-1)/2)(ceil(-n*(-1)^n/2))):
seq(a(n), n=0..30); # Alois P. Heinz, Aug 23 2021
MATHEMATICA
PartitionsQ /@ Table[n*((n + 1)/6), {n, Select[Range[50], Mod[#, 3] != 1 & ]}] (* Jean-François Alcover, Oct 31 2012, after Reinhard Zumkeller *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Missing initial 1 inserted by Sean A. Irvine, Aug 23 2021
STATUS
approved