login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014090 Numbers that are not the sum of a square and a prime. 10

%I #38 Mar 02 2019 02:32:03

%S 1,10,25,34,58,64,85,91,121,130,169,196,214,226,289,324,370,400,526,

%T 529,625,676,706,730,771,784,841,1024,1089,1225,1255,1351,1414,1444,

%U 1521,1681,1849,1906,1936,2116,2209,2304,2500,2809,2986,3136,3364,3481,3600

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

%C Sequence is infinite: if 2n-1 is composite then n^2 is in the sequence. (Proof: If n^2 = x^2 + p with p prime, then p = (n-x)(n+x), so n-x=1 and n+x=p. Hence 2n-1=p is prime, not composite.) - _Dean Hickerson_, Nov 27 2002

%C 21679 is the last known nonsquare in this sequence. See A020495. - _T. D. Noe_, Aug 05 2006

%C A002471(a(n))=0; complement of A014089. - _Reinhard Zumkeller_, Sep 07 2008

%C 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

%C Number of terms <10^k,k=0..8: 1, 8, 27, 75, 223, 719, 2361, 7759, ..., . - _Robert G. Wilson v_, May 26 2012

%C 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

%H Robert G. Wilson v, <a href="/A014090/b014090.txt">Table of n, a(n) for n = 1..10000</a> (first 115 terms from T. D. Noe)

%e From _Alonso del Arte_, May 26 2012: (Start)

%e 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)).

%e 11 is not in the sequence because it can be represented as 3^2 + 2 or 0^2 + 11. (End)

%t t={}; Do[k=0; While[k^2<n && !PrimeQ[n-k^2], k++ ]; If[k^2>=n, AppendTo[t,n]], {n,25000}]; t (* _T. D. Noe_, Aug 05 2006 *)

%t 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 *)

%t 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 *)

%Y Cf. A020495, A104275.

%Y Cf. A064233 (does not allow 0^2).

%K nonn,easy,nice

%O 1,2

%A _N. J. A. Sloane_, _R. K. Guy_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)