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

A171381 Numbers k such that (3^k + 1)/2 is prime.

Original entry on oeis.org

1, 2, 4, 16, 32, 64
Offset: 1

Views

Author

Joao Carlos Leandro da Silva (zxawyh66(AT)yahoo.com), Dec 07 2009

Keywords

Comments

Note that k must be a power of 2 (cf. A138083).
Similar to Fermat primes (A019434), and for the same reasons we expect this sequence to be finite as well.
The numbers (3^k + 1)/2 are strong-probable-primes to base 3, so don't test with that base. - Don Reble, Jun 15 2010
From Paul Bourdelais, Oct 13 2010: (Start)
Terms in sequence (3^k + 1)/2 factored to 10^18:
(3^(2^21)+1)/2 has factors: 155189249
(3^(2^22)+1)/2 is composite: RES64: [A158D7ED3E1CC427] (425462 sec)
(3^(2^23)+1)/2 is composite: RES64: [B0F07A3D55C5082A] (3424080 sec)
(3^(2^26)+1)/2 has factors: 3221225473
(3^(2^28)+1)/2 has factors: 12348030977
(3^(2^29)+1)/2 has factors: 77309411329
(3^(2^31)+1)/2 has factors: 4638564679681
(3^(2^32)+1)/2 has factors: 206158430209
(3^(2^34)+1)/2 has factors: 50474455662593
(3^(2^36)+1)/2 has factors: 911220261519361
(3^(2^38)+1)/2 has factors: 6597069766657
(3^(2^39)+1)/2 has factors: 46179488366593
(3^(2^44)+1)/2 has factors: 15586676835352577
(3^(2^45)+1)/2 has factors: 16044073672507393
(3^(2^49)+1)/2 has factors: 7881299347898369
(3^(2^51)+1)/2 has factors: 891712726219358209
(3^(2^54)+1)/2 has factors: 180143985094819841
For all other k < 55 (specifically, k = 24, 25, 27, 30, 33, 35, 37, 40, 41, 42, 43, 46, 47, 48, 50, 52, 53), no factor < 10^18 has been found.
(End)
Also, numbers k such that 3^k+1 is a semiprime. - Sean A. Irvine, Oct 16 2023

Examples

			(3^(2^0)+1)/2 = (3^1+1)/2 = 2 is prime.
(3^(2^1)+1)/2 = (3^2+1)/2 = 5 is prime.
(3^(2^2)+1)/2 = (3^4+1)/2 = 41 is prime.
(3^(2^3)+1)/2 = (3^8+1)/2 = 3281 is divisible by 17=1+2^4.
(3^(2^4)+1)/2 = (3^16+1)/2 = 21523361 is prime.
(3^(2^5)+1)/2 = (3^32+1)/2 = 926510094425921 is prime.
(3^(2^6)+1)/2 = (3^64+1)/2 = 1716841910146256242328924544641 is prime.
(3^(2^7)+1)/2 = (3^128+1)/2 is divisible by 257=1+2^8, so 2^7 is not a term.
(3^(2^8)+1)/2 = (3^256+1)/2 is divisible by 1+2^9*24, so 2^8 is not a term.
(3^(2^15)+1)/2 is divisible by 2^(2^4)+1, so 2^15 is not a term. - _Georgi Guninski_, Jun 13 2010
(3^(2^19)+1)/2 is divisible by 13631489, so 2^19 is not a term. - _Paul Zimmermann_, Jun 14 2010
(3^(2^20)+1)/2 is 5-composite so 2^20 is not a term. - _Serge Batalov_, Jun 14 2010
According to PFGW, 2^20 is not in the sequence: PFGW Version 3.3.4.20100405.x86_Stable [GWNUM 25.14] (3^1048576+1)/2 is composite: RES64: [9EE4CA1AABB9A816] (3229 sec) Base 5. Base 3 is useless here [cf. comment by _Don Reble_ - Ed.]. - _Georgi Guninski_, Jun 15 2010
2^23 is not in the sequence (listed as "Composite but no factor known" on the second Keller link). - _Serge Batalov_, Jun 18 2010
Verified 2^23 yields a composite: base 2 (PFGWv3.3.1). - _Paul Bourdelais_, Apr 25 2011
		

Crossrefs

Cf. A019434, A093625 (the primes), A138083 (exponents of powers of 2), A028491.

Programs

Extensions

Edited by N. J. A. Sloane, Dec 09 2009
Incorrect terms a(7)-a(15) deleted by Jon E. Schoenfield, Jun 12 2010
The next term, if it exists, is at least 2^19. - Georgi Guninski, Jun 13 2010
A comment in A093625 from Don Reble, Apr 28 2004, says the next term, if it exists, is >= 2^21.
k=2^21 yields a number divisible by 1+2^22*37. - M. F. Hasler, Jun 14 2010
Edited by N. J. A. Sloane, Jun 12 2010 - Jun 16 2010
Edited by M. F. Hasler, Oct 02 2012

A059917 a(n) = (3^(2^n) + 1)/2 = A059919(n)/2, n >= 0.

Original entry on oeis.org

2, 5, 41, 3281, 21523361, 926510094425921, 1716841910146256242328924544641, 5895092288869291585760436430706259332839105796137920554548481
Offset: 0

Views

Author

Henry Bottomley, Feb 08 2001

Keywords

Comments

Average of first 2^(n+1) powers of 3 divided by average of first 2^n powers of 3.
Numerator of b(n) where b(n) = (1/2)*(b(n-1) + 1/b(n-1)), b(0)=2. - Vladeta Jovovic, Aug 15 2002
From Daniel Forgues, Jun 22 2011: (Start)
Since for the generalized Fermat numbers 3^(2^n)+1 (A059919), we have a(n) = 2*a(n-1)*a(n-2)*...*a(1)*a(0) + 2, n >= 0, where for n = 0, we get 2*(empty product, i.e., 1) + 2 = 4 = a(0). This formula implies that the GCD of any pair of terms of A059919 is 2, which means that the terms of (3^(2^n)+1)/2 (A059917) are pairwise coprime.
2, 5, 41, 21523361, 926510094425921 are prime. 3281 = 17*193. (End)
a(0), a(1), a(2), a(4), a(5), and a(6) are prime. Conjecture: a(n) is composite for all n > 6. - Thomas Ordowski, Dec 26 2012
This may be a primality test for Mersenne numbers. a(2) = 41 == -1 mod 7 (=M3), a(4) = 21523361 == 30 == -1 mod 31 (=M5). However, a(10) is not == -1 mod M11. - Nobuyuki Fujita, May 16 2015

Examples

			a(2) = Average(1,3,9,27,81,243,729,2187)/Average(1,3,9,27) = 410/10 = 41.
		

Crossrefs

Cf. A059918, A059919. Primes are in A093625.

Programs

  • GAP
    List([0..10],n->(3^(2^n)+1)/2); # Muniru A Asiru, Aug 07 2018
  • Magma
    [(3^(2^n)+1)/2: n in [0..10]]; // Vincenzo Librandi, May 16 2015
    
  • Maple
    seq((3^(2^n)+1)/2,n=0..11); # Muniru A Asiru, Aug 07 2018
  • Mathematica
    Table[(3^(2^n) + 1)/2, {n, 0, 10}] (* Vincenzo Librandi, May 16 2015 *)
  • PARI
    { for (n=0, 11, write("b059917.txt", n, " ", (3^(2^n) + 1)/2); ) } \\ Harry J. Smith, Jun 30 2009
    

Formula

a(n) = a(n-1)*(3^(2^(n-1)) + 1) - 3^(2^(n-1)) = A059723(n+1)/A059723(n) = A059918(n) + 1 = a(n-1)*A059919(n-1) - A011764(n-1).
a(0) = 2; a(n) = ((2*a(n-1) - 1)^2 + 1)/2, n >= 1. - Daniel Forgues, Jun 22 2011

A337423 a(n) is the least prime of the form (3^j*5^k - 1)/2, j > 0, k > 0, j + k = n. a(n) = 0 if no such prime exists.

Original entry on oeis.org

7, 37, 67, 337, 607, 3037, 15187, 27337, 49207, 683437, 0, 131835937, 659179687, 19929037, 35872267, 228881835937, 2491129687, 0, 0, 311391210937, 12013549804687, 0, 235357947067, 1176789735337, 0, 10591107618037, 52955538090187, 5675104819335937, 608185958862304687
Offset: 2

Views

Author

Hugo Pfoertner, Aug 27 2020

Keywords

Crossrefs

A337425 a(n) is the least prime of the form (3^j*5^k + 1)/2, j > 0, k > 0, j + k = n. a(n) = 0 if no such prime exists.

Original entry on oeis.org

0, 23, 113, 563, 1013, 1823, 70313, 351563, 82013, 410063, 43945313, 1328603, 18452813, 1977539063, 0, 830376563, 538084013, 968551223, 13452100313, 1441625976563, 43584805013, 2145767211914063, 0, 0, 9806581127813, 6354664570823, 681012578320313, 441296150751563, 0
Offset: 2

Views

Author

Hugo Pfoertner, Aug 27 2020

Keywords

Crossrefs

A341211 Smallest prime p such that (p^(2^n) + 1)/2 is prime.

Original entry on oeis.org

3, 3, 3, 13, 3, 3, 3, 113, 331, 3631, 827, 3109, 4253, 7487, 71
Offset: 0

Views

Author

Jon E. Schoenfield, Feb 06 2021

Keywords

Comments

Expressions of the form m^j + 1 can be factored (e.g., m^3 + 1 = (m + 1)*(m^2 - m + 1)) for any positive integer j except when j is a power of 2, so (p^j + 1)/2 for prime p cannot be prime unless j is a power of 2.
a(12) <= 4253, a(13) <= 7487, a(14) <= 71. - Daniel Suteu, Feb 07 2021
a(13) > 2500 and a(14) = 71. - Jinyuan Wang, Feb 07 2021

Examples

			No term is smaller than 3 (since 2 is the only smaller prime, and (2^(2^n) + 1)/2 is not an integer).
(3^(2^0) + 1)/2 = (3^1 + 1)/2 = (3 + 1)/2 = 4/2 = 2 is prime, so a(0)=3.
(3^(2^1) + 1)/2 = (3^2 + 1)/2 = 5 is prime, so a(1)=3.
(3^(2^2) + 1)/2 = (3^4 + 1)/2 = 41 is prime, so a(2)=3.
(3^(2^3) + 1)/2 = (3^8 + 1)/2 = 3281 = 17*193 is not prime, nor is (p^8 + 1)/2 for any other prime < 13, but (13^8 + 1)/2 = 407865361 is prime, so a(3)=13.
		

Crossrefs

Cf. A093625 and A171381 (both for when p=3).

Programs

  • Alpertron
    x=3;x=N(x);NOT IsPrime((x^8192+1)/2);N(x)
    # Martin Ehrenstein, Feb 08 2021
    
  • PARI
    a(n) = my(p=3); while (!isprime((p^(2^n) + 1)/2), p=nextprime(p+1)); p; \\ Michel Marcus, Feb 07 2021
    
  • Python
    from sympy import isprime, nextprime
    def a(n):
      p, pow2 = 3, 2**n
      while True:
        if isprime((p**pow2 + 1)//2): return p
        p = nextprime(p)
    print([a(n) for n in range(9)]) # Michael S. Branicky, Mar 03 2021

Extensions

a(11) from Daniel Suteu, Feb 07 2021
a(12) from Jinyuan Wang, Feb 07 2021
a(13)-a(14), using Dario Alpern's integer factorization calculator and prior bounds, from Martin Ehrenstein, Feb 08 2021

A138083 Numbers k such that (3^(2^k) + 1)/2 is prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 6
Offset: 1

Views

Author

N. J. A. Sloane, Dec 09 2009

Keywords

Comments

See A171381, which is the main entry for this sequence.

Crossrefs

Programs

A096723 Numbers n such that 3^n has the form 2p-+1 where p is prime.

Original entry on oeis.org

1, 2, 3, 4, 7, 13, 16, 32, 64, 71, 103, 541, 1091, 1367, 1627, 4177, 9011, 9551, 36913, 43063, 49681, 57917, 483611, 877843, 2215303, 2704981, 3598867
Offset: 1

Views

Author

Lekraj Beedassy, Jul 05 2004

Keywords

Comments

For the corresponding primes p see A088553.
For n > 1, numbers n such that (3^n + (-1)^n)/2 is prime. - Thomas Ordowski, Dec 26 2016

Crossrefs

Programs

  • Mathematica
    Select[Range[4200],Or@@PrimeQ[(3^#+{1,-1})/2]&] (* Harvey P. Dale, Mar 05 2013 *)

Extensions

More terms from Ray Chandler, Jul 09 2004
a(25)-a(27) (from A028491 and A171381) from Tyler Busby, Mar 22 2023
Showing 1-7 of 7 results.