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 14 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

A106575 Perfect squares which are both the sum and the difference of two primes.

Original entry on oeis.org

4, 9, 16, 36, 64, 81, 100, 144, 196, 225, 256, 324, 400, 441, 484, 576, 676, 784, 900, 1024, 1089, 1156, 1296, 1444, 1600, 1764, 1936, 2116, 2304, 2500, 2704, 2916, 3136, 3364, 3600, 3844, 4096, 4356, 4624, 4900, 5184, 5476, 5776, 6084, 6400, 6724, 7056
Offset: 1

Views

Author

Alexandre Wajnberg, May 09 2005

Keywords

Comments

Equals A106548 with 0's removed.
Appears to contain all even squares.
By well-known conjectures, every even integer > 2 is both the sum and the difference of two primes; this would be a special case. - Franklin T. Adams-Watters, Sep 13 2015

Examples

			2^2 = 4 is in the sequence because it is the sum of two primes (2+2) and the difference of two primes (7-3). 10^2 = 100 is in the sequence because it is the sum and the difference of two primes: 97+3 (or 89+11) and 103-3. 11^2 = 121 is not in the sequence because it is neither the sum nor the difference of two primes. 13^2 = 169 is the sum of two primes (167+2), but it doesn't figure here since it is not the difference of two primes.
		

Crossrefs

Programs

  • Magma
    [ s: n in [1..85] | exists(t){ k: k in [1..s] | s-k gt 0 and IsPrime(k) and IsPrime(s-k) } and exists(u){ k: k in [1..s] | IsPrime(k) and IsPrime(s+k) } where s is n^2 ]; /* Klaus Brockhaus, Nov 17 2010 */

Extensions

Extended by Ray Chandler, May 12 2005
Edited by Klaus Brockhaus, Nov 17 2010

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

A269345 Smaller of two consecutive odd numbers that are composites.

Original entry on oeis.org

25, 33, 49, 55, 63, 75, 85, 91, 93, 115, 117, 119, 121, 123, 133, 141, 143, 145, 153, 159, 169, 175, 183, 185, 187, 201, 203, 205, 207, 213, 215, 217, 219, 235, 243, 245, 247, 253, 259, 265, 273, 285, 287, 289, 295, 297, 299, 301, 303, 319, 321, 323, 325, 327, 333
Offset: 1

Views

Author

Waldemar Puszkarz, Feb 24 2016

Keywords

Comments

Analogous to A001359 for odd composite numbers (A071904).
Consists of numbers that cannot be the difference of two primes: an odd number m can be the difference of two primes only if m+2 is prime, which cannot be the case for any a(n) as a(n)+2 is composite.
Some terms form subsequences of perfect powers, e.g., A106564 (for squares) and A269346 (for cubes).
Any composite of the form 6k+1 (A016921) is a term: (6k+1)+2 = 3(2k+1) is both odd and composite as a product of two odd numbers, thus 6k+1, being odd, is a term if it is composite.

Examples

			25 belongs to this sequence because 27=25+2 is the next odd composite.
		

Crossrefs

Cf. A071904 (odd composites), A001359 (similar sequence for primes).
Cf. A061673.

Programs

  • Magma
    [n: n in [1..350]| not IsPrime(n) and not IsPrime(n+2) and n mod 2 eq 1]; // Vincenzo Librandi, Feb 28 2016
  • Mathematica
    Select[Range[450], OddQ[#]&& !PrimeQ[#]&&!PrimeQ[#+2]&]
  • PARI
    for(n=1, 450, n%2==1&&!isprime(n)&&!isprime(n+2)&&print1(n, ", "))
    

Formula

a(n) = A061673(n) - 1. - M. F. Hasler, Nov 18 2018

Extensions

Name edited by Michel Marcus, Jul 27 2023

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
Showing 1-10 of 14 results. Next