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!)
A106564 Perfect squares which are not the difference of two primes. 15
25, 49, 121, 169, 289, 361, 529, 625, 729, 841, 961, 1225, 1369, 1681, 1849, 2209, 2401, 2601, 2809, 3025, 3481, 3721, 3969, 4225, 4489, 4761, 5041, 5329, 5625, 5929, 6241, 6889, 7225, 7569, 7921, 8281, 8649, 9025, 9409, 10201, 10609, 11449, 11881 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Squares in A269345; see also the Mathematica code. - Waldemar Puszkarz, Feb 27 2016
It is conjectured (see A020483) that every even number is a difference of primes, and this is known to be true for even numbers < 10^11. If so,this sequence consists of the odd squares n such that n+2 is composite. - Robert Israel, Feb 28 2016
LINKS
FORMULA
n^2 - A106546 with 0's removed.
EXAMPLE
a(2)=49 because it is the second perfect square which is impossible to obtain subtracting a prime from another one.
64 is not in the sequence because 64=67-3 (difference of two primes).
MAPLE
remove(t -> isprime(t+2), [seq(i^2, i=1..1000, 2)]); # Robert Israel, Feb 28 2016
MATHEMATICA
With[{lst=Union[(#[[2]]-#[[1]])&/@Subsets[Prime[Range[2000]], {2}]]}, Select[Range[140]^2, !MemberQ[lst, #]&]] (* Harvey P. Dale, Jan 04 2011 *)
Select[Range[1, 174, 2]^2, !PrimeQ[#+2]&]
Select[Select[Range[30000], OddQ[#]&& !PrimeQ[#]&& !PrimeQ[#+2]&], IntegerQ[Sqrt[#]]&] (* Waldemar Puszkarz, Feb 27 2016 *)
PROG
(PARI) for(n=1, 174, n%2==1&&!isprime(n^2+2)&&print1(n^2, ", ")) \\ Waldemar Puszkarz, Feb 27 2016
(Magma) [n^2: n in [1..150]| not IsPrime(n^2+2) and n mod 2 eq 1]; // Vincenzo Librandi, Feb 28 2016
CROSSREFS
Sequence in context: A110013 A109861 A348754 * A308177 A104777 A289829
KEYWORD
easy,nonn
AUTHOR
Alexandre Wajnberg, May 09 2005
EXTENSIONS
Extended by Ray Chandler, May 12 2005
STATUS
approved

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 27 07:11 EDT 2024. Contains 372009 sequences. (Running on oeis4.)