

A014090


Numbers that are not the sum of a square and a prime.


7



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Sequence is infinite: if 2n1 is composite then n^2 is in the sequence. (Proof: If n^2 = x^2 + p with p prime, then p = (nx)(n+x), so nx=1 and n+x=p. Hence 2n1=p is prime, not composite.)  Dean Hickerson, Nov 27 2002
21679 is the last known nonsquare in this sequence. See A020495.  T. D. Noe, Aug 05 2006
A002471(a(n))=0; complement of A014089.  Reinhard Zumkeller, Sep 07 2008
There are no prime numbers in this sequence because at the very least they can be represented as p + 0^2.  Alonso del Arte, May 26 2012
Number of terms <10^k,k=0..8: 1, 8, 27, 75, 223, 719, 2361, 7759, ..., .  Robert G. Wilson v, May 26 2012
So far there are only 21 terms which are not squares and they are the terms of A020495. Those that are squares, their square roots are members of A104275.  Robert G. Wilson v, May 26 2012


LINKS

Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (first 115 terms from T. D. Noe)


EXAMPLE

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)


MATHEMATICA

t={}; Do[k=0; While[k^2<n && !PrimeQ[nk^2], k++ ]; If[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 *)


CROSSREFS

Cf. A020495, A104275.
Cf. A064233 (does not allow 0^2).
Sequence in context: A174051 A225974 A274046 * A154057 A074814 A002600
Adjacent sequences: A014087 A014088 A014089 * A014091 A014092 A014093


KEYWORD

nonn,easy,nice


AUTHOR

N. J. A. Sloane, R. K. Guy


STATUS

approved



