A014090 Numbers that are not the sum of a square and a prime.
1, 10, 25, 34, 58, 64, 85, 91, 121, 130, 169, 196, 214, 226, 289, 324, 370, 400, 526, 529, 625, 676, 706, 730, 771, 784, 841, 1024, 1089, 1225, 1255, 1351, 1414, 1444, 1521, 1681, 1849, 1906, 1936, 2116, 2209, 2304, 2500, 2809, 2986, 3136, 3364, 3481, 3600
Offset: 1
Examples
From _Alonso del Arte_, May 26 2012: (Start) 10 is in the sequence because none of 10 - p_i are square (8, 7, 5, 3) and none of 10 - b^2 are prime (10, 9, 6, 1); i goes from 1 to pi(10) or b goes from 0 to floor(sqrt(10)). 11 is not in the sequence because it can be represented as 3^2 + 2 or 0^2 + 11. (End)
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (first 115 terms from T. D. Noe)
Programs
-
Mathematica
t={}; Do[k=0; While[k^2
=n, AppendTo[t,n]], {n,25000}]; t (* T. D. Noe, Aug 05 2006 *) max = 5000; Complement[Range[max], Flatten[Table[Prime[p] + b^2, {p, PrimePi[max]}, {b, 0, Ceiling[Sqrt[max]]}]]] (* Alonso del Arte, May 26 2012 *) fQ[n_] := Block[{j = Sqrt[n], k}, If[ IntegerQ[j] && !PrimeQ[2j - 1], True, k = Floor[j]; While[k > -1 && !PrimeQ[n - k^2], k--]; If[k == -1, True, False]]]; Select[ Range[3600], fQ] (* Robert G. Wilson v, May 26 2012 *)
Comments