cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A014090 #38 Mar 02 2019 02:32:03
%S A014090 1,10,25,34,58,64,85,91,121,130,169,196,214,226,289,324,370,400,526,
%T A014090 529,625,676,706,730,771,784,841,1024,1089,1225,1255,1351,1414,1444,
%U A014090 1521,1681,1849,1906,1936,2116,2209,2304,2500,2809,2986,3136,3364,3481,3600
%N A014090 Numbers that are not the sum of a square and a prime.
%C A014090 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 A014090 21679 is the last known nonsquare in this sequence. See A020495. - _T. D. Noe_, Aug 05 2006
%C A014090 A002471(a(n))=0; complement of A014089. - _Reinhard Zumkeller_, Sep 07 2008
%C A014090 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 A014090 Number of terms <10^k,k=0..8: 1, 8, 27, 75, 223, 719, 2361, 7759, ..., . - _Robert G. Wilson v_, May 26 2012
%C A014090 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 A014090 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 A014090 From _Alonso del Arte_, May 26 2012: (Start)
%e A014090 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 A014090 11 is not in the sequence because it can be represented as 3^2 + 2 or 0^2 + 11. (End)
%t A014090 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 A014090 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 A014090 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 A014090 Cf. A020495, A104275.
%Y A014090 Cf. A064233 (does not allow 0^2).
%K A014090 nonn,easy,nice
%O A014090 1,2
%A A014090 _N. J. A. Sloane_, _R. K. Guy_