

A238405


a(n) = {0 < k < n: prime(k) + pi(nk) 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



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.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..10000


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[nk]], 1, 0], {k, 1, n1}]
Table[a[n], {n, 1, 100}]


CROSSREFS

Cf. A000040, A000217, A238386, A238402.
Sequence in context: A324393 A071482 A071483 * A004173 A185370 A066745
Adjacent sequences: A238402 A238403 A238404 * A238406 A238407 A238408


KEYWORD

nonn


AUTHOR

ZhiWei Sun, Feb 26 2014


STATUS

approved



