login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (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
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
Sequence in context: A071483 A340499 A336033 * A004173 A185370 A352747
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 26 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 15:00 EDT 2024. Contains 371780 sequences. (Running on oeis4.)