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 22 results. Next

A051783 Numbers k such that 3^k + 2 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 8, 10, 14, 15, 24, 26, 36, 63, 98, 110, 123, 126, 139, 235, 243, 315, 363, 386, 391, 494, 1131, 1220, 1503, 1858, 4346, 6958, 7203, 10988, 22316, 33508, 43791, 45535, 61840, 95504, 101404, 106143, 107450, 136244, 178428, 361608, 504206, 1753088
Offset: 1

Views

Author

Jud McCranie, Dec 09 1999

Keywords

Comments

From Farideh Firoozbakht and M. F. Hasler, Dec 06 2009: (Start)
If Q is a perfect number such that gcd(Q, 3(3^a(n) + 2)) = 1, then x = 3^(a(n) - 1)*(3^a(n) + 2)*Q is a solution of the equation sigma(x) = 3(x - Q). This is a result of the following theorem:
Theorem: If Q is a (q-1)-perfect number for some prime q, then for all integers t, the equation sigma(x) = q*x - (2t+1)*Q has the solution x = q^(k-1)*p*Q whenever k is a positive integer such that p = q^k + 2t is prime, gcd(q^(k-1), p) = 1 and gcd(q^(k-1)*p,Q) = 1.
Note that by taking t = -1/2(m*q+1), this theorem gives us some solutions of the equation sigma(x) = q *(x + m*Q). See comment lines of the sequence A058959. (End)
No further terms < 200000. - Ray Chandler, Jul 31 2011
A090649 implies that 361608 is a member of this sequence. - Robert Price, Aug 18 2014
No further terms < 320000. - Luke W. Richards, Mar 04 2018
a(45) and a(46) are probable primes because a primality certificate has not yet been found. They have been verified PRP with mprime. - Luke W. Richards, May 04 2018
No further terms < 1300000. - Luke W. Richards, May 17 2018
No further terms < 1400000. - Luke W. Richards, Jul 28 2020
Conjecture: The number n = 3^k + 2 is prime if and only if 2^((n-1)/2) == -1 (mod n). - Maheswara Rao Valluri, Jun 01 2020. [Note that this is an if and only if assertion, so it does not follow from Fermat's Little Theorem. - N. J. A. Sloane, Sep 07 2020]

Examples

			3^8 + 2 = 6563 is prime, so 8 is in the sequence.
3^26 + 2 = 2541865828331, a prime number, so 26 is in the sequence.
		

Crossrefs

Programs

Extensions

{4346, 6958, 7203} from David J. Rusin, Sep 29 2000
10988 from Ray Chandler, Nov 21 2004
{22316, 33508} found by Henri Lifchitz, Sep-Oct 2002
{43791, 45535, 61840} found by Henri Lifchitz, Oct-Nov 2004
95504 found by Wojciech Florek Dec 15 2005. - Alexander Adamchuk, Mar 02 2008
Edited by N. J. A. Sloane, Dec 19 2009
{101404, 106143, 107450, 136244} from Mike Oakes, Nov 2009
178428 from Ray Chandler, Jul 29 2011
a(45)-a(46) from Luke W. Richards, May 04 2018
a(47) from Paul Bourdelais, Mar 29 2022

A102903 Primes of the form 3^k + 4.

Original entry on oeis.org

5, 7, 13, 31, 733, 19687, 59053, 31381059613, 205891132094653, 109418989131512359213, 1570042899082081611640534567, 323257909929174534292273980721360271853391
Offset: 1

Views

Author

Roger L. Bagula, Mar 01 2005

Keywords

Crossrefs

Cf. A000040, A058958 (associated k).
Cf. Primes of the form 3^k + d: A057735 (d=2), this sequence (d=4), A102870 (d=8), A102907 (d=10), A102874 (d=14), A243437 (d=16), A102904 (d=20), A243438 (d=22), A243439 (d=26), A102906 (d=28).

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is 3^n+4]; // Vincenzo Librandi, Jul 19 2012
  • Mathematica
    Select[Table[3^n+4,{n,0,200}],PrimeQ] (* Vincenzo Librandi, Jul 19 2012 *)

Formula

a(n) = 3^A058958(n) + 4. - Elmo R. Oliveira, Nov 09 2023

Extensions

Edited by Zak Seidov, Aug 29 2014

A182330 Primes of the form 5^k + 2.

Original entry on oeis.org

3, 7, 127, 762939453127
Offset: 1

Views

Author

Alex Ratushnyak, Apr 25 2012

Keywords

Comments

Next term has 100 digits.

Crossrefs

Programs

  • Mathematica
    Select[Table[5^n + 2, {n, 0, 500}], PrimeQ] (* T. D. Noe, Apr 25 2012 *)

Formula

a(n) = A242328(A087885(n)). - Amiram Eldar, Jul 23 2025

A228034 Primes of the form 9^n + 2.

Original entry on oeis.org

3, 11, 83, 6563, 59051, 4782971, 282429536483, 2541865828331, 150094635296999123, 57264168970223481226273458862846808078011946891, 30432527221704537086371993251530170531786747066637051
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2013

Keywords

Crossrefs

Cf. A004051 (primes of the form 2^a+3^b), A057735 (primes of the form 3^n+2), A090649 (associated n), A104070 (primes of the form 2^n+9), A159352 (primes of the form 10^n+3), A176495 (primes of the form 27^n+2), A182330 (primes of the form 5^n+2).

Programs

  • Magma
    [a: n in [0..300] | IsPrime(a) where a is 9^n+2];
  • Mathematica
    Select[Table[9^n + 2, {n, 0, 300}], PrimeQ]

A144231 Prime numbers of the form 3^k +- 2 for k >= 1.

Original entry on oeis.org

5, 7, 11, 29, 79, 83, 241, 727, 6563, 19681, 59051, 4782971, 14348909, 31381059607, 282429536483, 2541865828331, 150094635296999123, 450283905890997361, 36472996377170786401, 1144561273430837494885949696429
Offset: 1

Views

Author

Reikku Kulon, Sep 15 2008

Keywords

Comments

a(49) = 3^2224 - 2 and a(50) = 3^2521 - 2 are too big for a b-file. - Robert Israel, Nov 22 2015

Crossrefs

Programs

  • Maple
    A:= NULL:
    for k from 1 to 1000 do
      t:= 3^k;
      if isprime(t-2) then A:= A, t-2 fi;
      if isprime(t+2) then A:= A, t+2 fi;
    od:
    A; # Robert Israel, Nov 22 2015
  • Mathematica
    Reap[For[k = 1, k <= 100, k++, p = 3^k-2; If[PrimeQ[p], Sow[p]]; If[PrimeQ[p+4], Sow[p+4]]]][[2, 1]] (* Jean-François Alcover, Dec 18 2013 *)

A182331 Primes of the form 6^k + 1.

Original entry on oeis.org

2, 7, 37, 1297
Offset: 1

Views

Author

Alex Ratushnyak, Apr 25 2012

Keywords

Comments

No other terms for k < 3000. - T. D. Noe, Apr 25 2012
Apart from the first term, the exponents must be powers of two. Like Fermat primes, there are probably only finitely many terms. No more terms for k < 2^28 = 268435456. - Charles R Greathouse IV, Jul 16 2012

Crossrefs

Programs

  • Mathematica
    Select[Table[6^n + 1, {n, 0, 100}], PrimeQ] (* T. D. Noe, Apr 25 2012 *)
  • PFGW
    ABC2 6^(2^$a)+1
    a: from 0 to 18
    // Charles R Greathouse IV, Jul 16 2012

A228026 Primes of the form 4^k + 3.

Original entry on oeis.org

7, 19, 67, 4099, 65539, 262147, 268435459, 1073741827, 19342813113834066795298819
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2013

Keywords

Examples

			67 is a term because 4^3 + 3 = 67 is prime.
		

Crossrefs

Cf. A089437 (associated k).
Cf. Primes of the form r^k + h: A092506 (r=2, h=1), A057733 (r=2, h=3), A123250 (r=2, h=5), A104066 (r=2, h=7), A104070 (r=2, h=9), A057735 (r=3, h=2), A102903 (r=3, h=4), A102870 (r=3, h=8), A102907 (r=3, h=10), A290200 (r=4, h=1), this sequence (r=4, h=3), A228027 (r=4, h=9), A182330 (r=5, h=2), A228029 (r=5, h=6), A102910 (r=5, h=8), A182331 (r=6, h=1), A104118 (r=6, h=5), A104115 (r=6, h=7), A104065 (r=7, h=4), A228030 (r=7, h=6), A228031 (r=7, h=10), A228032 (r=8, h=3), A228033 (r=8, h=5), A144360 (r=8, h=7), A145440 (r=8, h=9), A228034 (r=9, h=2), A159352 (r=10, h=3), A159031 (r=10, h=7).

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is  4^n+3];
  • Mathematica
    Select[Table[4^n + 3, {n, 0, 200}], PrimeQ]

Formula

a(n) = 4^A089437(n) + 3. - Elmo R. Oliveira, Nov 14 2023

Extensions

Cross-references corrected by Robert Price, Aug 01 2017

A228032 Primes of the form 8^n + 3.

Original entry on oeis.org

11, 67, 4099, 32771, 262147, 1073741827, 19342813113834066795298819
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2013

Keywords

Crossrefs

Cf. A217354 (associated n).
Cf. Primes of the form k^n + h: A092506 (k=2, h=1), A057733 (k=2, h=3), A123250 (k=2, h=5), A104066 (k=2, h=7), A104070 (k=2, h=9), A057735 (k=3, h=2), A102903 (k=3, h=4), A102870 (k=3, h=8), A102907 (k=3, h=10), A290200 (k=4, h=1), A182330 (k=5, h=2), A102910 (k=5, h=8), A182331 (k=6, h=1), A104118 (k=6, h=5), A104115 (k=6, h=7), A104065 (k=7, h=4), this sequence (k=8, h=3), A144360 (k=8, h=7), A145440 (k=8, h=9), A228034 (k=9, h=2), A159352 (k=10, h=3), A159031 (k=10, h=7).

Programs

  • Magma
    [a: n in [0..300] | IsPrime(a) where a is  8^n+3];
  • Mathematica
    Select[Table[8^n + 3, {n, 0, 300}], PrimeQ]

Extensions

Corrected cross-references - Robert Price, Aug 01 2017

A234503 Number of ways to write n = k + m with k > 0 and m > 0 such that 3^(phi(k)/2 + phi(m)/12) + 2 is prime, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 2, 1, 1, 2, 3, 2, 1, 1, 1, 2, 1, 2, 2, 3, 2, 4, 4, 4, 2, 3, 2, 1, 3, 4, 8, 3, 4, 4, 4, 6, 3, 4, 6, 3, 5, 5, 3, 2, 2, 6, 5, 3, 2, 3, 7, 4, 3, 4, 4, 3, 4, 4, 4, 5, 2, 5, 2, 6, 5, 7, 3, 5, 7, 6, 13, 5, 7, 7, 10, 6, 8, 8, 9, 6, 7, 8, 6, 6, 5, 7, 9, 6, 7, 8, 10
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 26 2013

Keywords

Comments

It might seem that a(n) > 0 for all n > 14, but a(43905) = 0. If a(n) > 0 infinitely often, then there are infinitely many primes of the form 3^m + 2.
Similarly, it might seem that for n > 26 there is a positive integer k < n such that m = phi(k)/2 + phi(n-k)/12 is an integer with 3^m - 2 prime, but n = 41213 is a counterexample.
See also A234451 and A236358 for similar sequences.

Examples

			a(15) = 1 since 15 = 1 + 14 with 3^(phi(1)/2 + phi(14)/12) + 2 = 3 + 2 = 5 prime.
a(23) = 1 since 23 = 10 + 13 with 3^(phi(10)/2 + phi(13)/12) + 2 = 3^3 + 2 = 29 prime.
a(24) = 1 since 24 = 3 + 21 with 3^(phi(3)/2 + phi(21)/12) + 2 = 3^2 + 2 = 11 prime.
a(37) = 1 since 37 = 9 + 28 with 3^(phi(9)/2 + phi(28)/12) + 2 = 3^4 + 2 = 83 prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=3^(EulerPhi[k]/2+EulerPhi[n-k]/12)+2
    a[n_]:=Sum[If[PrimeQ[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A228029 Primes of the form 5^n + 6.

Original entry on oeis.org

7, 11, 31, 131, 631, 1220703131
Offset: 1

Views

Author

Vincenzo Librandi, Aug 11 2013

Keywords

Crossrefs

Cf. A089142 (associated n).
Cf. Primes of the form k^n + h: A092506 (k=2, h=1), A057733 (k=2, h=3), A123250 (k=2, h=5), A104066 (k=2, h=7), A104070 (k=2, h=9), A057735 (k=3, h=2), A102903 (k=3, h=4), A102870 (k=3, h=8), A102907 (k=3, h=10), A290200 (k=4, h=1), A182330 (k=5, h=2), this sequence (k=5, h=6), A102910 (k=5, h=8), A182331 (k=6, h=1), A104118 (k=6, h=5), A104115 (k=6, h=7), A104065 (k=7, h=4), A144360 (k=8, h=7), A145440 (k=8, h=9), A228034 (k=9, h=2), A159352 (k=10, h=3), A159031 (k=10, h=7).

Programs

  • Magma
    [a: n in [0..200] | IsPrime(a) where a is  5^n+6];
  • Mathematica
    Select[Table[5^n + 6, {n, 0, 200}], PrimeQ]

Extensions

Corrected cross-references - Robert Price, Aug 01 2017
Showing 1-10 of 22 results. Next