A212709 Positive integers not of the form p * c^2 + b^2, with p prime and c and b nonzero integers.
1, 2, 5, 10, 25, 58, 130
Offset: 1
Keywords
Examples
Since 24 can be expressed as 5 * 2^2 + 2^2, it is not in the sequence. No such expression exists for 25, hence it is in the sequence. Since 26 can be expressed as 17 * 1^2 + 3^2, it is not in the sequence.
Programs
-
Mathematica
max = 10^5; Complement[Range[max], Flatten[Table[Prime[p]a^2 + b^2, {p, PrimePi[max]}, {a, Ceiling[Sqrt[max/2]]}, {b, Ceiling[Sqrt[max]]}]]]
-
PARI
v=vectorsmall(10^5,i,1);forprime(p=2,#v,for(a=1,sqrtint(#v\p), b=0; while((t=p*a^2+b++^2)<=#v,v[t]=0)));for(i=1,#v,if(v[i], print1(i", "))) \\ Charles R Greathouse IV, May 29 2012
Comments