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.

A373945 Integers k such that the difference between the sum of nonprime numbers and the sum of prime numbers <= k is a square.

This page as a plain text file.
%I A373945 #16 Jun 25 2024 20:19:36
%S A373945 0,1,4,6,13,19,24,116,139,6015,39112,65605,94020,1566318,2446259,
%T A373945 3226100,5897845,85155749,1628068810,4244431852,14977877039,
%U A373945 21118804085,110954554736
%N A373945 Integers k such that the difference between the sum of nonprime numbers and the sum of prime numbers <= k is a square.
%C A373945 The terms of this sequence are integers k such that A051352(k) is in A000290.
%e A373945 13 is a term, because (1 + 4 + 6 + 8 + 9 + 10 + 12) - (2 + 3 + 5 + 7 + 11 + 13) = 3^2.
%o A373945 (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)};
%o A373945 a373945() \\ _Hugo Pfoertner_, Jun 23 2024
%Y A373945 Cf. A000040, A018252, A051352, A000290.
%K A373945 nonn,more
%O A373945 1,3
%A A373945 _Gonzalo Martínez_, Jun 23 2024
%E A373945 a(14)-a(23) from _Hugo Pfoertner_, Jun 25 2024