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-9 of 9 results.

A050524 Primes of the form 9*2^n-1.

Original entry on oeis.org

17, 71, 1151, 73727, 294911, 18874367, 79164837199871, 83010348331692982271, 5704427701027032306735164424191, 5841333965851681082096808370372607, 6576757367989063131916581747223273588451696443391
Offset: 1

Views

Author

N. J. A. Sloane, Dec 29 1999

Keywords

Crossrefs

See A002236 for more terms.

Programs

  • Mathematica
    Select[9 2^Range[0,160]-1,PrimeQ]  (* Harvey P. Dale, Apr 13 2011 *)

A230527 Numbers n such that 3^6*2^n - 1 is prime.

Original entry on oeis.org

5, 17, 23, 113, 125, 173, 199, 319, 377, 397, 785, 937, 2167, 3785, 3977, 5957, 7727, 8249, 14677, 19577, 20485, 36319, 57509, 60703, 66677, 76877, 77017, 83407, 229405, 1003373
Offset: 1

Views

Author

Lei Zhou, Oct 22 2013

Keywords

Comments

Riesel Primes with k = 3^6 = 729.
Checked up to n = 1003600.

Examples

			729*2^5-1=23327 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    b=3^6; i=0; Table[While[i++; cp=b*2^i-1; !PrimeQ[cp]]; i, {j, 1, 15}]
  • PARI
    is(n)=ispseudoprime(3^6*2^n-1) \\ Charles R Greathouse IV, May 22 2017

Extensions

Lei Zhou, Nov 08 2013, added a Mathematica program for small elements.

A230537 Numbers n such that 3^7*2^n - 1 is prime.

Original entry on oeis.org

1, 2, 6, 13, 22, 29, 30, 33, 36, 50, 61, 118, 180, 226, 405, 433, 522, 789, 929, 960, 1026, 1030, 1118, 1266, 1521, 1718, 2536, 3029, 3366, 4253, 9157, 10165, 23641, 29877, 30648, 47265, 56097, 90501, 101981, 103021, 108370, 117909, 157237, 169156, 174168
Offset: 1

Views

Author

Lei Zhou, Oct 22 2013

Keywords

Comments

Riesel Primes with k = 3^7 = 2187.
Checked up to n = 1000000.

Examples

			2187*2^1-1=4373 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    b=3^7;i=0; Table[While[i++; cp=b*2^i-1; !PrimeQ[cp]]; i, {j, 1, 30}]
  • PARI
    is(n)=ispseudoprime(3^7*2^n-1) \\ Charles R Greathouse IV, May 22 2017

Extensions

Lei Zhou, Nov 08 2013, added a Mathematica program for small elements.

A238797 Smallest k such that 2^k - (2*n+1) and (2*n+1)*2^k - 1 are both prime, k <= 2*n+1, or 0 if no such k exists.

Original entry on oeis.org

0, 3, 4, 0, 0, 0, 0, 5, 6, 5, 7, 6, 9, 5, 0, 7, 6, 6, 0, 0, 10, 0, 6, 0, 7, 9, 6, 7, 8, 0, 17, 8, 0, 0, 7, 0, 0, 18, 0, 0, 0, 8, 0, 10, 8, 9, 18, 0, 0, 7, 0, 0, 8, 12, 0, 7, 0, 11, 16, 0, 21, 0, 0, 0, 8, 14, 0, 0, 18, 9, 10, 8, 77, 0, 0, 0, 12, 8, 0, 11, 18, 0
Offset: 0

Views

Author

Keywords

Comments

Numbers n such that 2^k - (2*n+1) and (2*n+1)*2^k - 1 are both prime:
For k = 0: 2, 3, 5, 7, 13, 17, ... Intersection of A000043 and A000043
for k = 1: 3, 4, 6, 94, ... Intersection of A050414 and A002235
for k = 2: 4, 8, 10, 12, 18, 32, ... Intersection of A059608 and A001770
for k = 3: Intersection of A059609 and A001771
for k = 4: 21, ... Intersection of A059610 and A002236
for k = 5: Intersection of A096817 and A001772
for k = 6: Intersection of A096818 and A001773
for k = 7: 5, 10, 14, ... Intersection of A059612 and A002237
for k = 8: 6, 16, 20, 36, ... Intersection of A059611 and A001774
for k = 9: 5, 21, ... Intersection of A096819 and A001775
for k = 10: 7, 13, ... Intersection of A096820 and A002238
for k = 11: 6, 8, 12, ...
for k = 12: 9, ...
for k = 13: 5, 8, 10, ...

Examples

			a(1) = 3 because 2^3 - (2*1+1) = 5 and (2*1+1)*2^3 - 1 = 23 are both prime, 3 = 2*1+1,
a(2) = 4 because 2^4 - (2*2+1) = 11 and (2*2+1)*2^4 - 1 = 79 are both prime, 4 < 2*2+1 = 5.
		

Crossrefs

Cf. A238748, A238904 (smallest k such that 2^k + (2n+1) and (2n+1)*2^k + 1 are both prime, k <= n, or -1 if no such k exists).

Programs

  • Mathematica
    a[n_] := Catch@ Block[{k = 1}, While[k <= 2*n+1, If[2^k - (2*n + 1) > 0 && PrimeQ[2^k - (2*n+1)] && PrimeQ[(2*n + 1)*2^k-1], Throw@k]; k++]; 0]; a/@ Range[0, 80] (* Giovanni Resta, Mar 15 2014 *)

Extensions

a(0), a(19), a(20) corrected by Giovanni Resta, Mar 13 2014

A330412 Integers m such that sigma(m) + sigma(8*m) = 18*m.

Original entry on oeis.org

34, 568, 147328, 603971584, 9663643648, 39582416502784, 696341272098017608537735168, 765635325572111542783369494684623699968, 3615610599582728119969414707766982030374842621310535527825408, 3791242500068058721125048996612134914443116117566314438843154038784
Offset: 1

Views

Author

Jinyuan Wang, Feb 12 2020

Keywords

Comments

This is the case h = 8 of the h-perfect numbers as defined in the Harborth link.

Examples

			34 is a term since sigma(34) + sigma(8*34) = 612, that is 18*34.
		

Crossrefs

Programs

  • PARI
    isok(m) = sigma(m) + sigma(8*m) == 18*m;

Formula

a(n) = 2^A002236(n) * A050524(n).

A212311 Numbers n such that 3^8*2^n - 1 is prime.

Original entry on oeis.org

1, 15, 33, 43, 61, 121, 295, 315, 367, 681, 771, 789, 1485, 4915, 5305, 33649, 81343, 85005, 116307, 154869, 230731, 279591, 287847, 329515, 545353, 1053481
Offset: 1

Views

Author

Lei Zhou, Oct 24 2013

Keywords

Comments

Riesel Primes with k = 3^8 = 6561.
Checked up to n = 1053627.

Examples

			6561*2^1-1=13121 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    b=2^8;i=0; Table[While[i++; cp=b*2^i-1; !PrimeQ[cp]]; i, {j, 1, 13}]
  • PARI
    is(n)=ispseudoprime(3^8*2^n-1) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

Lei Zhou, Nov 08 2013, added a Mathematica program for small elements.

A238749 Exponents of third Mersenne prime pair: numbers n such that 2^n - 5 and 5*2^n - 1 are both prime.

Original entry on oeis.org

4, 8, 10, 12, 18, 32
Offset: 1

Views

Author

Keywords

Comments

a(7) > 350028.
Intersection of A059608 and A001770.
Exponents of Mersenne prime pairs {2^n - (2k + 1), (2k + 1)*2^n - 1}:
for k = 0: 2, 3, 5, 7, 13, 17, ... Intersection of A000043 and A000043
for k = 1: 3, 4, 6, 94, ... Intersection of A050414 and A002235
for k = 2: 4, 8, 10, 12, 18, 32, ... Intersection of A059608 and A001770
for k = 3: Intersection of A059609 and A001771
for k = 4: 21, ... Intersection of A059610 and A002236
for k = 5: Intersection of A096817 and A001772
for k = 6: Intersection of A096818 and A001773
for k = 7: 5, 10, 14, ... Intersection of A059612 and A002237
for k = 8: 6, 16, 20, 36, ... Intersection of A059611 and A001774
for k = 9: 5, 21, ... Intersection of A096819 and A001775
for k = 10: 7, 13, ... Intersection of A096820 and A002238
for k = 11: 6, 8, 12, ...
for k = 12: 9, ...
for k = 13: 5, 8, 10, ...
for k = 14:

Examples

			a(1) = 4 because 2^4 - 5 = 11 and 5*2^4 - 1 = 79 are both primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..100] | IsPrime(2^n-5) and IsPrime(5*2^n-1)]; // Vincenzo Librandi, May 17 2015
  • Mathematica
    fQ[n_] := PrimeQ[2^n - 5] && PrimeQ[5*2^n - 1]; k = 1; While[ k < 15001, If[fQ@ k, Print@ k]; k++] (* Robert G. Wilson v, Mar 05 2014 *)
    Select[Range[1000], PrimeQ[2^# - 5] && PrimeQ[5 2^# - 1] &] (* Vincenzo Librandi, May 17 2015 *)
  • PARI
    isok(n) = isprime(2^n - 5) && isprime(5*2^n - 1); \\ Michel Marcus, Mar 04 2014
    

A231374 Numbers n such that 3^9*2^n - 1 is prime.

Original entry on oeis.org

4, 7, 19, 22, 32, 46, 50, 62, 83, 103, 124, 142, 190, 230, 256, 260, 422, 596, 1084, 2270, 2770, 5366, 5434, 5762, 6826, 9239, 15211, 22556, 58790, 81319, 172510, 225350, 236326, 258592, 445364, 975020
Offset: 1

Views

Author

Lei Zhou, Nov 08 2013

Keywords

Comments

Riesel Primes with k = 3^9 = 19683.
Checked up to n = 1000000.

Examples

			19683*2^4-1=314927 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    i=0;Table[While[i++;cp=19683*2^i-1;!PrimeQ[cp]];i,{j,1,20}]
  • PARI
    is(n)=ispseudoprime(3^9*2^n-1) \\ Charles R Greathouse IV, Jun 13 2017

A386857 Numbers k such that both 9*2^k - 1 and 9*2^k + 1 are prime.

Original entry on oeis.org

1, 3, 7, 43, 63, 211
Offset: 1

Views

Author

Ken Clements, Aug 05 2025

Keywords

Comments

The exponent, k, of 2 must be odd because the exponent, 2, of 3 (where 9 = 3^2) is even and the sum of the exponents of prime factors 2 and 3 must be odd to form a product that is a twin prime average. Of all subsequences of A027856, this is the longest known where the power of 3 is fixed.
Amiram Eldar noted that using A002236 and A002256, we obtain a(7) > 5.6*10^6, if it exists.

Examples

			a(1) = 1 because 2*9 = 18 with 17 and 19 prime.
a(2) = 3 because 8*9 = 72 with 71 and 73 prime.
a(3) = 7 because 128*9 = 1152 with 1151 and 1153 prime.
a(4) = 43 because 8796093022208*9 = 79164837199872 with 79164837199871 and 79164837199873 prime.
		

Crossrefs

Intersection of A002236 and A002256.

Programs

  • Maple
    q:= k-> (m-> andmap(isprime, [m-1, m+1]))(9*2^k):
    select(q, [2*i-1$i=1..111])[];  # Alois P. Heinz, Aug 08 2025
  • Python
    from gmpy2 import is_prime
    def is_TPpi2(e2, e3):
        N = 2**e2 * 3**e3
        return is_prime(N-1) and is_prime(N+1)
    print([k for k in range(1, 100001, 2) if is_TPpi2(k, 2)])
Showing 1-9 of 9 results.