OFFSET
1,5
COMMENTS
Conjecture: a(n) > 0 for all n > 2.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(13) = 1 since 13 = 3 + 10 with 3*4 - prime(3) = 7 prime and 10 = 4*5/2 a positive triangular number.
a(52) = 1 since 52 = 37 + 15 with 37*38 - prime(37) = 1249 prime and 15 = 5*6/2 a positive triangular number.
a(61) = 1 since 61 = 6 + 55 with 6*7 - prime(6) = 29 prime and 55 = 10*11/2 a positive triangular number.
a(313) = 1 since 313 = 37 + 276 with 37*38 - prime(37) = 1249 prime and 276 = 23*24/2 a positive triangular number.
MATHEMATICA
PQ[n_]:=PrimeQ[n(n+1)-Prime[n]]
TQ[n_]:=IntegerQ[Sqrt[8n+1]]
a[n_]:=Sum[If[PQ[k]&&TQ[n-k], 1, 0], {k, 1, n-1}]
Table[a[n], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 13 2014
STATUS
approved