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

A125734 Primes of the form 4*3^k + 1.

Original entry on oeis.org

5, 13, 37, 109, 2917, 19131877, 57395629, 16210220612075905069, 3187367866510497232065375864429355521950801431840733951694899540869109890815626195932616388528013, 254244997489062154119688681828370010268347235132197783249391539881181660045297550875174703528321187968562717038040968333
Offset: 1

Views

Author

David Eppstein, Feb 06 2007, Feb 07 2007

Keywords

Comments

Venkataraman showed that, for every p of this form, 3p is a perfect totient number (cf. A082897).

Examples

			37 = 4*3^2 + 1 is a prime of this form. 973 = 4*3^5 + 1 = 7*139 is not a prime, so is not included in this sequence.
		

References

  • T. Venkataraman, Perfect totient number, The Mathematics Student, Vol. 43 (1975), p. 178. MR0447089.

Crossrefs

Programs

  • Mathematica
    Do[p = 4*3^i + 1; If[PrimeQ@p, Print@p], {i, 0, 300}] (* Robert G. Wilson v, Feb 20 2007 *)

Formula

4*3^k + 1 where k belongs to A005537.

Extensions

2 more terms from Robert G. Wilson v, Feb 20 2007

A245241 Integers n such that 6 * 7^n + 1 is prime.

Original entry on oeis.org

0, 1, 4, 9, 99, 412, 2633, 5093, 5632, 28233, 36780, 47084, 53572
Offset: 1

Views

Author

Robert Price, Nov 14 2014

Keywords

Comments

All terms correspond to verified primes, that is, not merely probable primes.
a(14) > 2*10^5.

Examples

			4 is in this sequence because 6 * 7^4 + 1 = 14407, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,200000], PrimeQ[6 * 7^# + 1] &]

A216889 Numbers k such that 12*3^k + 1 is prime.

Original entry on oeis.org

0, 1, 2, 5, 13, 14, 38, 200, 248, 884, 1004, 1253, 1634, 3305, 3521, 9601, 19784, 72697
Offset: 1

Views

Author

Vincenzo Librandi, Sep 26 2012

Keywords

Comments

a(19) > 2*10^5. - Robert Price, Mar 16 2014
All terms are verified primes (i.e., not merely probable primes). - Robert Price, Mar 16 2014

Crossrefs

Programs

  • Magma
    [n: n in [0..4000] | IsPrime(12*3^n + 1)];
    
  • Mathematica
    Select[Range[4000], PrimeQ[12 * 3^# + 1] &]
  • PARI
    is(n)=ispseudoprime(12*3^n+1) \\ Charles R Greathouse IV, Jun 13 2017

Formula

a(n) = A005537(n+1) - 1. - Bruno Berselli, Sep 27 2012

Extensions

a(16)-a(17) from Vincenzo Librandi, Sep 30 2012
a(18) from Robert Price, Mar 16 2014

A216890 Numbers n such that 14*3^n + 1 is prime.

Original entry on oeis.org

1, 2, 3, 18, 22, 26, 27, 33, 39, 57, 62, 94, 145, 246, 390, 398, 402, 571, 690, 906, 1062, 1254, 1367, 1627, 1954, 2409, 3107, 14754, 15378, 24219, 46138, 98883, 161178
Offset: 1

Views

Author

Vincenzo Librandi, Sep 26 2012

Keywords

Comments

The next terms are > 6000.
a(34) > 2*10^5. - Robert Price, Mar 16 2014
All terms are verified primes (i.e., not probable primes). - Robert Price, Mar 16 2014

Crossrefs

Programs

  • Magma
    [n: n in [0..4000] | IsPrime(14*3^n+1)];
    
  • Mathematica
    Select[Range[4000], PrimeQ[14 3^# + 1] &]
  • PARI
    is(n)=ispseudoprime(14*3^n+1) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

a(28)-a(33) from Robert Price, Mar 16 2014

A305531 Smallest k >= 1 such that (n-1)*n^k + 1 is prime.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 3, 10, 3, 1, 2, 1, 1, 4, 1, 29, 14, 1, 1, 14, 2, 1, 2, 4, 1, 2, 4, 5, 12, 2, 1, 2, 2, 9, 16, 1, 2, 80, 1, 2, 4, 2, 3, 16, 2, 2, 2, 1, 15, 960, 15, 1, 4, 3, 1, 14, 1, 6, 20, 1, 3, 946, 6, 1, 18, 10, 1, 4, 1, 5, 42, 4, 1, 828, 1, 1, 2, 1, 12, 2, 6, 4, 30, 3, 3022, 2, 1, 1
Offset: 2

Views

Author

Eric Chen, Jun 04 2018

Keywords

Comments

a(prime(j)) + 1 = A087139(j).
a(123) > 10^5, a(342) > 10^5, see the Barnes link for the Sierpinski base-123 and base-342 problems.
a(251) > 73000, see A087139.

Crossrefs

For the numbers k such that these forms are prime:
a1(b): numbers k such that (b-1)*b^k-1 is prime
a2(b): numbers k such that (b-1)*b^k+1 is prime
a3(b): numbers k such that (b+1)*b^k-1 is prime
a4(b): numbers k such that (b+1)*b^k+1 is prime (no such k exists when b == 1 (mod 3))
a5(b): numbers k such that b^k-(b-1) is prime
a6(b): numbers k such that b^k+(b-1) is prime
a7(b): numbers k such that b^k-(b+1) is prime
a8(b): numbers k such that b^k+(b+1) is prime (no such k exists when b == 1 (mod 3)).
Using "-------" if there is currently no OEIS sequence and "xxxxxxx" if no such k exists (this occurs only for a4(b) and a8(b) for b == 1 (mod 3)):
.
b a1(b) a2(b) a3(b) a4(b) a5(b) a6(b) a7(b) a8(b)
--------------------------------------------------------------------
4 A272057 ------- ------- xxxxxxx A059266 A089437 A217348 xxxxxxx
7 A046866 A245241 ------- xxxxxxx A191469 A217130 A217131 xxxxxxx
11 A046867 A057462 ------- ------- ------- ------- ------- -------
12 A079907 A251259 ------- ------- ------- A137654 ------- -------
13 A297348 ------- ------- xxxxxxx ------- ------- ------- xxxxxxx
14 A273523 ------- ------- ------- ------- ------- ------- -------
15 ------- ------- ------- ------- ------- ------- ------- -------
16 ------- ------- ------- xxxxxxx ------- ------- ------- xxxxxxx
Cf. (smallest k such that these forms are prime) A122396 (a1(b)+1 for prime b), A087139 (a2(b)+1 for prime b), A113516 (a5(b)), A076845 (a6(b)), A178250 (a7(b)).

Programs

  • PARI
    a(n)=for(k=1,2^16,if(ispseudoprime((n-1)*n^k+1),return(k)))

A387060 Numbers k such that 16 * 3^k + 1 is prime.

Original entry on oeis.org

0, 3, 4, 5, 12, 24, 36, 77, 195, 296, 297, 533, 545, 644, 884, 932, 1409, 2061, 2453, 2985, 3381, 4980, 5393, 11733, 13631, 14516, 21004, 27663, 32645, 39453, 67055, 90543
Offset: 1

Views

Author

Ken Clements, Aug 15 2025

Keywords

Comments

a(33) > 10^5.
Conjecture: The only intersection with A385115 is at k = 3 where 2^4 * 3^3 = 432 = A027856(8).
Idea: For odd k > 3, covering systems ensure mutual exclusion:
If k = 1, 9, 13, 19, 25, 31, 37, 39, 43, 49, 55 (mod 60), then 7 or 31 divides (16*3^k+1).
If k = 5, 7, 11, 17, 23, 27, 29, 35, 41, 47, 53, 57, 59 (mod 60), then 11 or 13 divides (16*3^k-1).
If k = 15, 21, 33, 45, 51 (mod 60), various primes including {11,31,43,109,277,433,...} ensure at least one of 16*3^k +- 1 is composite.
If k = 3 (mod 60) and k > 3, the probability of intersection becomes vanishingly small.
Only k = 3 escapes all divisibility conditions. Verified to k = 10^5.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 4000], PrimeQ[16*3^# + 1] &] (* Amiram Eldar, Aug 16 2025 *)
  • Python
    from gmpy2 import is_prime
    print([k for k in range(4_000) if is_prime(16 * 3**k + 1)])

A216888 Numbers k such that 6*3^k + 1 is prime.

Original entry on oeis.org

0, 1, 3, 4, 5, 8, 15, 16, 29, 53, 56, 59, 64, 131, 179, 319, 695, 781, 821, 896, 1251, 1453, 4216, 5479, 6224, 7841, 12095, 13781, 17719, 43955, 64821, 82779, 105105, 152528, 165895, 191813, 529679, 1074725, 1086111, 1175231, 1277861, 1346541, 3123035, 3648968, 5570080, 6236771, 10852676
Offset: 1

Views

Author

Vincenzo Librandi, Sep 26 2012

Keywords

Examples

			3 is a term because 6*3^3 + 1 = 163 is prime.
7 is not a term because 6*3^7 + 1 = 13123 = 11*1193 is composite.
		

Crossrefs

Associated primes are in A111974.

Programs

  • Magma
    /* Gives only the terms up to 1453: */ [n: n in [0..1500] | IsPrime(6*3^n + 1)];
    
  • Mathematica
    Select[Range[5000], PrimeQ[6 3^# + 1] &]
  • PARI
    is(n)=ispseudoprime(6*3^n+1) \\ Charles R Greathouse IV, Jun 13 2017

Formula

a(n) = A003306(n+1)-1. - Bruno Berselli, Sep 27 2012

Extensions

More terms from Vincenzo Librandi, Oct 01 2012
a(41)-a(47) from the data at A003306 added by Amiram Eldar, Jul 18 2025

A387201 Numbers k such that 32 * 3^k + 1 is prime.

Original entry on oeis.org

1, 4, 8, 9, 32, 36, 48, 74, 112, 186, 204, 364, 393, 572, 781, 1208, 2624, 2778, 4522, 4896, 5272, 32884
Offset: 1

Views

Author

Ken Clements, Aug 21 2025

Keywords

Comments

a(23) > 10^5.
Conjecture: This sequence intersects with A387197 at k = 4 to form twin primes with center N = 2^5 * 3^4 = 2592 = A027856(10). Any such intersection has to be at an even k because if k is odd, either N-1 or N+1 has to be divisible by 5. A covering system can be constructed that eliminates all other intersections except where k = 4(mod 60), and for k > 4 with k = 4(mod 60), the search up to 10^5 makes the probability of another intersection in this residue class vanishingly small.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 5000], PrimeQ[32 * 3^# + 1] &] (* Amiram Eldar, Aug 21 2025 *)
  • Python
    from gmpy2 import is_prime
    print([ k for k in range(4000) if is_prime(32 * 3**k + 1)])
Showing 1-8 of 8 results.