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.

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

This page as a plain text file.
%I A238405 #7 Feb 26 2014 10:32:02
%S A238405 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,
%T A238405 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,
%U A238405 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
%N A238405 a(n) = |{0 < k < n: prime(k) + pi(n-k) is a triangular number}|, where pi(.) is given by A000720.
%C A238405 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.
%H A238405 Zhi-Wei Sun, <a href="/A238405/b238405.txt">Table of n, a(n) for n = 1..10000</a>
%e A238405 a(7) = 1 since 7 = 2 + 5 with prime(2) + pi(5) = 3 + 3 = 3*4/2.
%e A238405 a(24) = 1 since 24 = 4 + 20 with prime(4) + pi(20) = 7 + 8 = 5*6/2.
%e A238405 a(158) = 1 since 158 = 148 + 10 with prime(148) + pi(10) = 857 + 4 = 41*42/2.
%t A238405 TQ[n_]:=IntegerQ[Sqrt[8n+1]]
%t A238405 a[n_]:=Sum[If[TQ[Prime[k]+PrimePi[n-k]],1,0],{k,1,n-1}]
%t A238405 Table[a[n],{n,1,100}]
%Y A238405 Cf. A000040, A000217, A238386, A238402.
%K A238405 nonn
%O A238405 1,3
%A A238405 _Zhi-Wei Sun_, Feb 26 2014