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.

A093625 Primes of the form (3^m + 1)/2.

Original entry on oeis.org

2, 5, 41, 21523361, 926510094425921, 1716841910146256242328924544641
Offset: 1

Views

Author

Hugo Pfoertner, Apr 19 2004

Keywords

Comments

Primes can only occur for m=2^k. The next term (if it exists) has k >= 21 (i.e., more than 10^6 decimal digits). - Don Reble, Apr 28 2004. [For the latest results about the search, see A171381. - N. J. A. Sloane, Jun 14 2010]
a(7) >= (3^(2^24) + 1)/2, if it exists. - Tyler Busby, Mar 22 2023

Examples

			a(3)=41 because it can be written as (3^4 + 1)/2 = 82/2.
		

Crossrefs

A171381 is the main entry for this sequence. Cf. also A059917, A138083.

Extensions

Erroneous terms deleted by N. J. A. Sloane, Jun 14 2010

A088553 Primes of the form (3^k-1)/2 or (3^k+1)/2.

Original entry on oeis.org

2, 5, 13, 41, 1093, 797161, 21523361, 926510094425921, 1716841910146256242328924544641, 3754733257489862401973357979128773, 6957596529882152968992225251835887181478451547013
Offset: 1

Views

Author

Cino Hilliard, Nov 17 2003

Keywords

Comments

The next term is too large to include.
The next term has 258 digits. - Harvey P. Dale, Dec 04 2018

Crossrefs

Programs

  • Mathematica
    Select[Flatten[Table[(3^x+{1,-1})/2,{x,150}]],PrimeQ] (* Harvey P. Dale, Dec 04 2018 *)

Extensions

Edited by Don Reble, May 03 2006

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

A305237 Numbers m such that m, m+1 and m+2 all have primitive roots.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 17, 25, 81, 241
Offset: 1

Views

Author

Jianing Song, Jun 04 2018

Keywords

Comments

Start of run of 3 consecutive numbers in A033948.
The next term is 3^541 - 2, which is too large to be included here. No more terms below 3^100000, or approximately 1.33*10^47712.
There is a multiple of 4 in every four consecutive positive integers and it clearly has no primitive roots if it is larger than 4. Again, there is a multiple of 3 in every three consecutive positive integers, so it must be a power of 3 or two times a power of 3, and the other two numbers must be odd prime powers or two times odd prime powers.
According to Pillai's conjecture, there're only finitely many solutions to |3^a - p^b| = 2, |3^a - 2*p^b| = 1, |p^a - 2*3^b| = 1 with a,b >= 2, p odd primes (no solution other than 3^3 - 5^2 = 2, 3^5 - 2*11^2 = 1 below 3^100000). So beyond (25, 26, 27) and (241, 242, 243), it's very likely that all three consecutive numbers with primitive roots are of the form (3^i, 3^i + 1, 3^i + 2), (3^j - 2, 3^j - 1, 3^j), (2*3^k - 1, 2*3^k, 2*3^k + 1) such that (3^i + 1)/2, 3^i + 2, 3^j - 2, (3^j - 1)/2, 2*3^k - 1, 2*3^k + 1 are primes, which only produces one more solution (3^541 - 2, 3^541 - 1, 3^541) below 3^1000000.

Examples

			81, 82, 83 all have primitive roots (in fact, their least common primitive root is 47), so 81 is a term.
Note that A014224 and A028491 have a term 541 in common, so 3^541 - 2, 3^541 - 1 and 3^541 all have primitive roots, so 3^541 - 2 is a term.
		

Crossrefs

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

A275575 Numbers k such that (3^k + 1)/(3 - (-1)^k) is a prime.

Original entry on oeis.org

2, 3, 4, 5, 7, 13, 16, 23, 32, 43, 64, 281, 359, 487, 577, 1579, 1663, 1741, 3191, 9209, 11257, 12743, 13093, 17027, 26633, 104243, 134227, 152287, 700897, 1205459
Offset: 1

Views

Author

Thomas Ordowski, Dec 25 2016

Keywords

Crossrefs

Programs

  • Maple
    A275575:=n->`if`(isprime((3^n + 1)/(3 - (-1)^n)), n, NULL): seq(A275575(n), n=1..2*10^3); # Wesley Ivan Hurt, Dec 26 2016
  • Mathematica
    Select[Range[0, 10^3], PrimeQ[(3^# + 1)/(3 - (-1)^#)] &]
  • PARI
    isok(n) = isprime( (3^n + 1)/(3 - (-1)^n)); \\ Michel Marcus, Dec 26 2016
Showing 1-7 of 7 results.