OFFSET
1,2
COMMENTS
We note that a(n) > 0 for n up to 3580 with the only exception n = 1831. Also, for n = 722, there is no number k among 0, ..., n with q(n+k(k+1)/2) - 1 prime.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..600
EXAMPLE
a(6) = 1 since q(6+0*1/2) + 1 = q(6) + 1 = 5 is prime.
a(20) = 1 since q(20+8*9/2) + 1 = q(56) + 1 = 7109 is prime.
a(104) = 1 since q(104+15*16/2 + 1 = q(224) + 1 = 1997357057 is prime.
a(219) = 1 since q(219+65*66/2) + 1 = q(2364) + 1 = 111369933847869807268722580000364711 is prime.
a(1417) > 0 since q(1417+1347*1348/2) + 1 = q(909295) + 1 is prime.
MATHEMATICA
q[n_]:=PartitionsQ[n]
a[n_]:=Sum[If[PrimeQ[q[n+k(k+1)/2]+1], 1, 0], {k, 0, n-1}]
Table[a[n], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 13 2014
STATUS
approved