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.

Showing 1-4 of 4 results.

A106564 Perfect squares which are not the difference of two primes.

Original entry on oeis.org

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
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

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

Examples

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

Crossrefs

Programs

  • Magma
    [n^2: n in [1..150]| not IsPrime(n^2+2) and n mod 2 eq 1]; // Vincenzo Librandi, Feb 28 2016
  • 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 *)
  • PARI
    for(n=1, 174, n%2==1&&!isprime(n^2+2)&&print1(n^2, ", ")) \\ Waldemar Puszkarz, Feb 27 2016
    

Formula

n^2 - A106546 with 0's removed.

Extensions

Extended by Ray Chandler, May 12 2005

A106548 Perfect squares n^2 which are both the sum and the difference of two primes (otherwise 0).

Original entry on oeis.org

0, 4, 9, 16, 0, 36, 0, 64, 81, 100, 0, 144, 0, 196, 225, 256, 0, 324, 0, 400, 441, 484, 0, 576, 0, 676, 0, 784, 0, 900, 0, 1024, 1089, 1156, 0, 1296, 0, 1444, 0, 1600, 0, 1764, 0, 1936, 0, 2116, 0, 2304, 0, 2500, 0, 2704, 0, 2916, 0, 3136, 0, 3364, 0, 3600, 0, 3844, 0
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Crossrefs

Formula

a(n) = Min(A106545(n), A106546(n)).

Extensions

Extended by Ray Chandler, May 12 2005

A106547 Perfect squares n^2 which are neither the sum nor the difference of two primes (otherwise 0).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 0, 0, 0, 0, 289, 0, 0, 0, 0, 0, 529, 0, 625, 0, 0, 0, 0, 0, 961, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1681, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2601, 0, 2809, 0, 0, 0, 0, 0, 3481, 0, 0, 0, 0, 0, 4225, 0, 4489, 0, 0, 0, 0, 0, 5329, 0, 0, 0, 0, 0, 6241, 0, 0, 0, 6889, 0
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Crossrefs

Formula

a(n) = Min(A106544(n), n^2-A106546(n)).

Extensions

Corrected and extended by Ray Chandler, May 12 2005

A108321 a(n) = n^2 if n^2 is not the difference of two primes; otherwise a(n) = 0.

Original entry on oeis.org

0, 0, 0, 0, 25, 0, 49, 0, 0, 0, 121, 0, 169, 0, 0, 0, 289, 0, 361, 0, 0, 0, 529, 0, 625, 0, 729, 0, 841, 0, 961, 0, 0, 0, 1225, 0, 1369, 0, 0, 0, 1681, 0, 1849
Offset: 0

Views

Author

Alexandre Wajnberg, Jun 30 2005

Keywords

Comments

This sequence is also n^2 - A106546

Examples

			a(4)=0 because the fourth perfect square 16 is the difference between two primes: 19-3. a(5)=25 figures here because the nearest prime greater than 25 is 29 and the difference 29-25 is 4 (an even number >2), thus not a prime; all other greater primes are odd and the difference with 25 will give an even number, thus again not a prime.
		

Crossrefs

Showing 1-4 of 4 results.