login
Positive integers not of the form p * c^2 + b^2, with p prime and c and b nonzero integers.
1

%I #15 Jun 01 2012 19:26:00

%S 1,2,5,10,25,58,130

%N Positive integers not of the form p * c^2 + b^2, with p prime and c and b nonzero integers.

%C Many numbers can be ruled out from membership in this sequence with the case c = 1, which then corresponds to p + b^2 (see A064233).

%C If a positive integer is of the form p * c^2 + b^2, then it may potentially have two different factorizations in Z[sqrt(-p)] (assuming that is not a unique factorization domain, of course): the familiar factorization in Z, and (c + b sqrt(-p))(c - b sqrt(-p)).

%C There are no more terms <= 2*10^9. - _Donovan Johnson_, May 30 2012

%e Since 24 can be expressed as 5 * 2^2 + 2^2, it is not in the sequence.

%e No such expression exists for 25, hence it is in the sequence.

%e Since 26 can be expressed as 17 * 1^2 + 3^2, it is not in the sequence.

%t 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]]}]]]

%o (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

%K nonn

%O 1,2

%A _Alonso del Arte_, May 24 2012