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-10 of 13 results. Next

A106571 Indices n of perfect squares n^2 which are not the difference of two primes.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 23, 25, 27, 29, 31, 35, 37, 41, 43, 47, 49, 51, 53, 55, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 107, 109, 113, 115, 119, 121, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 149, 151, 153, 155
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Comments

Also, n such that 1+n^2 is a nontotient (A005277). - T. D. Noe, Sep 13 2007

Examples

			a(3)=11 because the third square which is not the difference of two primes (121=11^2) is the 11th one in the succession of the perfect squares (thus index 11).
		

Crossrefs

Cf. A067201 (n such that n^2 + 2 is prime).

Formula

a(n) = sqrt(A106564(n)).

Extensions

Extended by Ray Chandler, May 12 2005

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

A106544 Perfect squares n^2 which are not the sum of two primes (otherwise 0).

Original entry on oeis.org

1, 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, 1521, 0, 1681, 0, 0, 0, 2025, 0, 0, 0, 0, 0, 2601, 0, 2809, 0, 0, 0, 3249, 0, 3481, 0, 0, 0, 0, 0, 4225, 0, 4489, 0, 0, 0, 0, 0, 5329, 0, 0, 0, 0, 0, 6241, 0, 6561
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Comments

For odd n, n^2 is odd so the two primes must be opposite in parity. Lesser prime must be 2 and greater prime must be n^2-2. Thus for odd n, n^2 is the sum of two primes iff n^2-2 is prime. - Ray Chandler, May 12 2005

Examples

			a(10)=0 because 10^2=100=97+3 (sum of two primes)
a(11)=11^2=121, which is impossible to obtain summing two primes.
		

Crossrefs

Formula

a(n) = n^2 - A106545(n).

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

A106562 Perfect squares which are not the sum of two primes.

Original entry on oeis.org

1, 121, 289, 529, 625, 961, 1521, 1681, 2025, 2601, 2809, 3249, 3481, 4225, 4489, 5329, 6241, 6561, 6889, 7225, 7569, 8281, 9025, 9409, 9801, 10201, 11025, 11881, 12321, 12769, 13225, 15129, 15625, 16641, 17689, 18769, 19881, 20449, 21609
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Examples

			a(2)=121 because it is the second perfect square which is impossible to obtain summing two primes.
100 is not in the sequence because 100=97+3 (sum of two primes).
		

Crossrefs

Programs

Formula

A106544 with 0's removed.

Extensions

Extended by Ray Chandler, May 12 2005

A106573 Perfect squares which are neither the sum nor the difference of two primes.

Original entry on oeis.org

121, 289, 529, 625, 961, 1681, 2601, 2809, 3481, 4225, 4489, 5329, 6241, 6889, 7225, 7569, 8281, 9025, 9409, 10201, 11881, 12769, 13225, 15625, 16641, 17689, 18769, 19881, 20449, 22201, 22801, 23409, 24649, 25281, 26569, 27225, 27889, 30625
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Examples

			a(2)=289 because it is the second perfect square which is impossible to obtain adding a prime to - or subtracting from - another one. 64 is not in the sequence because 64=67-3, a difference of two primes.
		

Crossrefs

Formula

A106547 with 0's removed.

Extensions

Corrected and extended by Ray Chandler, May 12 2005

A106577 Indices n of perfect squares n^2 which are both the sum and the difference of two primes.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 33, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 117, 118, 120, 122
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Examples

			a(3)=4 because the third square which is the sum and the difference of two primes (16=4^2) is the 4th one in
the succession of the perfect squares (thus: index 4).
		

Crossrefs

Formula

a(n) = SQRT(A106575(n)).

Extensions

Extended by Ray Chandler, May 12 2005

A106546 a(n) = n^2 if n^2 is the difference of two primes, otherwise a(n) = 0.

Original entry on oeis.org

1, 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, 1521, 1600, 0, 1764, 0, 1936, 2025, 2116, 0, 2304, 0, 2500, 0, 2704, 0, 2916, 0, 3136, 3249, 3364, 0, 3600, 0
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Comments

For odd n, n^2 is odd so the two primes must be opposite in parity. Lesser prime must be 2 and greater prime must be n^2+2. Thus for odd n, n^2 is the difference of two primes iff n^2+2 is prime.
An odd difference can be obtained only by subtracting 2 from some prime > 2, hence a(n) = 0 if n is odd and n^2+2 is composite.

Examples

			a(6) = 6^2 = 36 = 41-5 (two primes).
a(5) = 0 and a(7) = 0 because 5^2+2 =27 = 3*3*3 and 7^2+2 =51 = 3*17 are composite.
		

Crossrefs

Formula

n^2 - A106546 gives perfect squares which are not the difference of two primes (otherwise 0).

Extensions

Edited and extended by Klaus Brockhaus and Ray Chandler, May 12 2005

A106545 a(n) = n^2 if n^2 is the sum of two primes, otherwise a(n) = 0.

Original entry on oeis.org

0, 4, 9, 16, 25, 36, 49, 64, 81, 100, 0, 144, 169, 196, 225, 256, 0, 324, 361, 400, 441, 484, 0, 576, 0, 676, 729, 784, 841, 900, 0, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 0, 1600, 0, 1764, 1849, 1936, 0, 2116, 2209, 2304, 2401, 2500, 0, 2704, 0, 2916, 3025
Offset: 1

Views

Author

Alexandre Wajnberg, May 08 2005

Keywords

Comments

For odd n, n^2 is odd so the two primes must be opposite in parity. Lesser prime must be 2 and greater prime must be n^2-2. Thus for odd n, n^2 is the sum of two primes iff n^2-2 is prime.

Examples

			a(2) = 2^2 = 4 = 2+2, a(5) = 5^2 = 25 = 23+2 (two primes).
a(1) = 0 because the sum of two primes is at least 4 and a(11) = 0 because 11^2 - 2 = 119 = 7*17 is composite.
		

Crossrefs

Programs

  • Mathematica
    stpQ[n_]:=If[OddQ[n],PrimeQ[n^2-2],AnyTrue[n^2-Prime[Range[ PrimePi[ n^2]]], PrimeQ]]; Table[If[stpQ[n],n^2,0],{n,60}] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 21 2018 *)

Formula

a(n) = n^2 - A106544(n).

Extensions

Edited and extended by Klaus Brockhaus and 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
Showing 1-10 of 13 results. Next