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.
%I A365275 #7 Aug 30 2023 20:51:04 %S A365275 0,0,0,0,1,1,1,2,2,3,3,3,4,4,4,4,4,5,5,6,6,6,6,6,7,8,8,8,9,9,9,9,9,10, %T A365275 10,10,10,10,10,11,12,12,12,12,13,13,13,13,13,14,14,14,15,15,15,15,15, %U A365275 16,16,16,17,17,17,17,18,18,18,19,19,19,19,19,20,21,21,21,21,21,21,21 %N A365275 Number of integers k <= n that can be written as k = m^2+p^2 where p is a prime and m is a positive integer. %H A365275 Andrew Granville, Cihan Sabuncu, and Alisa Sedunova, <a href="https://arxiv.org/abs/2308.14911">The multiplication table constant and sums of two squares</a>, arXiv:2308.14911 [math.NT], 2023. %t A365275 a={}; For[n=1, n<=80, n++, nk=0; For[k=1, k<=n, k++, flag=1; For[m=1, m<=Sqrt[k]&&flag==1, m++, sp=Sqrt[k-m^2]; If[IntegerQ[sp^2]&&PrimeQ[sp], nk++; flag=0]]]; AppendTo[a,nk]]; a (* _Stefano Spezia_, Aug 30 2023 *) %o A365275 (PARI) isok(k) = my(q); for(i=1, sqrtint(k), if (issquare(q=k-i^2) && isprime(sqrtint(q)), return(1))); return(0); %o A365275 a(n) = sum(k=1, n, isok(k)); %Y A365275 Cf. A361300. %K A365275 nonn %O A365275 1,8 %A A365275 _Michel Marcus_, Aug 30 2023