OFFSET
1,4
COMMENTS
Conjecture: a(n) > 0 for all n > 0.
This has been verified for n up to 10^5. See also A262999 for a similar conjecture.
By Chebyshev's inequality, pi(n*(n+1)/2) > n-1 for all n > 1.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 1 since 1 = pi(1*2/2) + pi(1+1*2/2).
a(2) = 1 since 2 = pi(1*2/2) + pi(1+2*3/2).
a(3) = 1 since 3 = pi(2*3/2) + pi(1+1*2/2).
a(4) = 3 since 4 = pi(1*2/2) + pi(1+3*4/2) = pi(2*3/2) + pi(1+2*3/2) = pi(3*4/2) + pi(1+1*2/2).
MATHEMATICA
s[k_]:=s[k]=PrimePi[k(k+1)/2+1]
t[n_]:=t[n]=PrimePi[n(n+1)/2]
Do[r=0; Do[If[s[k]>n, Goto[bb]]; Do[If[t[j]>n-s[k], Goto[aa]]; If[t[j]==n-s[k], r=r+1]; Continue, {j, 1, n-s[k]+1}]; Label[aa]; Continue, {k, 1, n}]; Label[bb]; Print[n, " ", r]; Continue, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 07 2015
STATUS
approved