login
A238405
a(n) = |{0 < k < n: prime(k) + pi(n-k) is a triangular number}|, where pi(.) is given by A000720.
1
0, 0, 2, 0, 1, 0, 1, 2, 3, 3, 2, 2, 1, 3, 3, 1, 2, 1, 2, 5, 3, 3, 4, 1, 2, 2, 3, 3, 1, 2, 3, 4, 5, 6, 5, 3, 2, 2, 3, 3, 2, 5, 5, 4, 3, 2, 4, 3, 2, 3, 3, 2, 4, 6, 4, 6, 9, 8, 6, 4, 3, 2, 3, 4, 5, 3, 5, 6, 5, 5, 1, 1, 3, 5, 4, 4, 9, 7, 6, 6, 4, 6, 3, 3, 5, 8, 8, 5, 4, 7, 8, 4, 5, 3, 2, 3, 4, 4, 4, 4
OFFSET
1,3
COMMENTS
Conjecture: a(n) > 0 for all n > 6, and a(n) = 1 only for n = 5, 7, 13, 16, 18, 24, 29, 71, 72, 158.
EXAMPLE
a(7) = 1 since 7 = 2 + 5 with prime(2) + pi(5) = 3 + 3 = 3*4/2.
a(24) = 1 since 24 = 4 + 20 with prime(4) + pi(20) = 7 + 8 = 5*6/2.
a(158) = 1 since 158 = 148 + 10 with prime(148) + pi(10) = 857 + 4 = 41*42/2.
MATHEMATICA
TQ[n_]:=IntegerQ[Sqrt[8n+1]]
a[n_]:=Sum[If[TQ[Prime[k]+PrimePi[n-k]], 1, 0], {k, 1, n-1}]
Table[a[n], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 26 2014
STATUS
approved