login
A387790
Number of ways to write n as S(i) + S(j) + 2*S(k), where i,j,k are positive integers with i >= j, and S(k) is the sum of the first k primes.
2
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 1, 0, 1, 2, 1, 2, 0, 1, 1, 0, 2, 2, 1, 2, 1, 2, 1, 2, 0, 1, 2, 1, 2, 2, 0, 0, 3, 2, 2, 2, 0, 1, 0, 2, 2, 1, 2, 2, 1, 3, 2, 3, 0, 1, 2, 2, 2, 0, 1, 2, 1, 3, 3, 2, 0, 0, 3, 0, 2, 4, 0, 1, 4, 3, 1, 4, 0, 3, 1, 1, 3, 1, 2, 0
OFFSET
1,14
COMMENTS
Conjecture: a(n) > 0 for all n >= 5340. In other words, each integer n >= 5340 is a sum of four elements of the set {Sum_{k=1..m} prime(k): m = 1,2,3,...} two of which are equal.
This has been verified for n <= 3*10^5.
It seems that the only values of n >= 10^4 with a(n) = 1 are 10795, 12595, 13458, 13507, 21143, 27986.
EXAMPLE
a(70) = 1 with 70 = 58 + 2 + 2*5 = S(7) + S(1) + 2*S(2).
a(13507) = 1 with 13507 = 11599 + 160 + 2*874 = S(72) + S(11) + 2*S(23).
a(21143) = 1 with 21143 = 9206 + 4661 + 2*3638 = S(65) + S(48) + 2*S(43).
a(27986) = 1 with 27986 = 15116 + 6338 + 2*3266 = S(81) + S(55) + 2*S(41).
MATHEMATICA
p[n_]:=p[n]=Prime[n]; S[n_]:=S[n]=Sum[p[k], {k, 1, n}];
f[n_]:=f[n]=Sum[If[S[k]<=n&&S[k+1]>n, k, 0], {k, 1, PrimePi[n]}];
tab={}; Do[r=0; Do[If[n-2S[k]-S[j]==S[f[n-2S[k]-S[j]]], r=r+1], {k, 1, f[Floor[n/2]]}, {j, 1, f[Floor[(n-2S[k])/2]]}];
tab=Append[tab, r], {n, 1, 100}]; Print[tab]
CROSSREFS
Sequence in context: A141571 A164067 A353918 * A305490 A374060 A375149
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 09 2025
STATUS
approved