login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064233 Numbers that are not the sum of a prime number and a nonzero square. 8
1, 2, 5, 10, 13, 25, 31, 34, 37, 58, 61, 64, 85, 91, 121, 127, 130, 169, 196, 214, 226, 289, 324, 370, 379, 400, 439, 526, 529, 571, 625, 676, 706, 730, 771, 784, 829, 841, 991, 1024, 1089, 1225, 1255, 1351, 1414, 1444, 1521, 1549, 1681, 1849, 1906, 1936, 2116 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The sequence is infinite, cf. A014090. Subsequence of squares = A053726^2. Subsequence of nonsquares is disjoint union of A020495 and A065377 and so is probably finite. - Vladeta Jovovic, Apr 02 2005
LINKS
I. V. Poljakov, On the exceptional set for the sum of a prime and a perfect square, 1982 Math. USSR Izv. 19 611.
EXAMPLE
5 = 1+4 or 2+3; a prime and a square do not appear together in either sum.
MATHEMATICA
Complement[ Table[ n, {n, 1, 10000} ], Union[ Flatten[ Table[ Prime[ i ] + j^2, {i, 1, 1230}, {j, 1, 100} ] ] ] ]
nspQ[n_]:=Length[Select[IntegerPartitions[n, {2}], (PrimeQ[#[[1]]] && IntegerQ[ Sqrt[ #[[2]]]])||(PrimeQ[#[[2]]]&&IntegerQ[Sqrt[#[[1]]]])&]] == 0; Select[ Range[ 2200], nspQ] (* Harvey P. Dale, Jun 18 2021 *)
PROG
(PARI) list(lim)=my(v=vectorsmall(lim\1, i, 1), u=List(), b); forprime(p=2, #v, b=0; while((t=p+b++^2)<=#v, v[t]=0)); for(i=1, #v, if(v[i], listput(u, i))); Vec(u) \\ Charles R Greathouse IV, May 29 2012
CROSSREFS
Complement of A058654.
Sequence in context: A135467 A230550 A018571 * A051952 A103188 A281229
KEYWORD
nonn,nice
AUTHOR
Axel Harvey, Sep 22 2001
EXTENSIONS
More terms from Vladeta Jovovic, Robert G. Wilson v and Felice Russo, Sep 23 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 07:26 EDT 2024. Contains 371782 sequences. (Running on oeis4.)