A257553 Primes whose squares are not the sums of two consecutive nonsquares.
2, 3, 7, 17, 41, 239, 577, 665857, 9369319, 63018038201, 489133282872437279, 19175002942688032928599, 123426017006182806728593424683999798008235734137469123231828679
Offset: 1
Keywords
Examples
2 is in the sequence because it is prime and its square 4 is in A256944: 4 is not a sum of consecutive numbers. 3 is in the sequence because it is prime and its square 9 is in A256944: 9 = 2^2 + 5. 7 is in the sequence because it is prime and its square 49 is in A256944: 49 = 24 + 5^2. 5 is not in the sequence because neither 12 nor 13 is a square.
Programs
-
Mathematica
lim = 1000000; s = Plus @@@ (Partition[#, 2, 1] & @ Complement[Range@ lim, Range[Floor@ Sqrt[lim]]^2]); Select[Sqrt[#] & /@ Select[Range@ Floor[Sqrt[lim]]^2, ! MemberQ[s, #] &] , PrimeQ] (* Michael De Vlieger, Apr 29 2015 *)
Extensions
Name clarified by Michael De Vlieger and Jon E. Schoenfield, May 03 2015
Edited by Wolfdieter Lang, May 07 2015
Comments