login
A373945
Integers k such that the difference between the sum of nonprime numbers and the sum of prime numbers <= k is a square.
1
0, 1, 4, 6, 13, 19, 24, 116, 139, 6015, 39112, 65605, 94020, 1566318, 2446259, 3226100, 5897845, 85155749, 1628068810, 4244431852, 14977877039, 21118804085, 110954554736
OFFSET
1,3
COMMENTS
The terms of this sequence are integers k such that A051352(k) is in A000290.
EXAMPLE
13 is a term, because (1 + 4 + 6 + 8 + 9 + 10 + 12) - (2 + 3 + 5 + 7 + 11 + 13) = 3^2.
PROG
(PARI) a373945(upto=10^8) = {my(s=-1, pp=2); print1(0, ", ", 1, ", "); forprime (p=3, upto, for (k=pp+1, p-1, s+=k; if (issquare(s), print1(k, ", "))); s-=p; if (issquare(s), print1(p, ", ")); pp=p)};
a373945() \\ Hugo Pfoertner, Jun 23 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gonzalo Martínez, Jun 23 2024
EXTENSIONS
a(14)-a(23) from Hugo Pfoertner, Jun 25 2024
STATUS
approved