cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A238405 a(n) = |{0 < k < n: prime(k) + pi(n-k) is a triangular number}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 26 2014

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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}]
Showing 1-1 of 1 results.