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.

Previous Showing 11-20 of 21 results. Next

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

A249903 Numbers n such that 2n+1 and sigma(n) are both noncomposite numbers.

Original entry on oeis.org

1, 2, 9, 729
Offset: 1

Views

Author

Jaroslav Krizek, Nov 14 2014

Keywords

Comments

If a(5) exists, it must be a square bigger than 3*10^8.
Intersection of A005097 and A023194.
Conjecture: 2 and 9 are the only numbers n such that 2n - 1, 2n + 1 and sigma(n) are all primes.
From Hiroaki Yamanouchi, Nov 19 2014: (Start)
a(n) (n >= 3) must be of the form 3^(2k) for some positive integer k.
a(5) (if it exists) >= 3^877000 (see A003306 and A028491).
(End)

Examples

			Number 729 is in the sequence because 2*729 + 1 = 1459 and sigma(729) = 1093 (both primes).
		

Crossrefs

Programs

  • Magma
    [1] cat [n: n in [1..10000000] | IsPrime(2*n+1) and IsPrime(SumOfDivisors(n))]; // corrected by Vincenzo Librandi, Nov 14 2014
  • Mathematica
    Join[{1}, Select[Range[0, 1000], PrimeQ[DivisorSigma[1, #]]&& PrimeQ[2 # + 1] &]] (* Vincenzo Librandi, Nov 14 2014 *)
    Join[{1},Select[Range[1000],AllTrue[{2#+1,DivisorSigma[1,#]},PrimeQ]&]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 06 2019 *)

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)))

A342037 Numbers k such that A307437(k) is divisible by 3.

Original entry on oeis.org

1, 27, 702, 1107, 1431, 2187, 3375, 3456, 4266, 5157, 5805, 6561, 6831, 7668, 8073, 11313, 11961, 12771, 12825, 13149, 13176, 13257, 14526, 14715, 14796, 15039, 16011, 16227, 16497, 17388, 17496, 17631, 19251, 19332, 19413, 20223, 20277, 20871, 20952, 21654
Offset: 1

Views

Author

Jianing Song, Feb 26 2021

Keywords

Comments

Indices of terms of A307437 that is divisible by 3.
For e > 0, 3^e is a term if and only if 2*3^e+1 is composite. Hence this sequence is infinite.
All terms > 1 are divisible by 27. Proof: Write a term k = 3^a*r > 1, 3 does not divide r. Suppose A307437(k) = 3^e*s, 3 does not divide s, e >= 1.
i) a = 0. If s = 1, then 2k = 2r divides psi(3^e) = 2*3^(e-1) => k = r = 1, a contradiction. Hence s > 1, then 2k = 2r divides psi(s).
ii) a = 1. If s has a prime factor congruent to 1 modulo 3, then r | psi(s) => 2k = 6r divides psi(s). Otherwise, we must have 3 | psi(3^e) => e >= 2, then 2k = 6r divides psi(7*s), a contradiction.
iii) a = 2. If s has a prime factor congruent to 1 modulo 9, then r | psi(s) => 2k = 18r divides psi(s). Otherwise, we must have 9 | psi(3^e) => e >= 3, then 2k = 18r divides psi(19*s), a contradiction.

Examples

			The smallest k such that 2*702 | psi(k) is k = 4293 = 3^4 * 53, hence 702 is a term.
The smallest k such that 2*3375 | psi(k) is k = 20331 = 3^4 * 251, hence 3375 is a term.
The smallest k such that 2*3456 | psi(k) is k = 20817 = 3^4 * 257, hence 3456 is a term.
		

Crossrefs

Programs

  • PARI
    print1("1, "); forstep(n=27, 10000, 27, if(A307437(n)%3==0, print1(n, ", "))) \\ see A307437 for its program

Extensions

More terms from Chai Wah Wu, Feb 27 2021

A120491 Numbers k such that 22*3^k + 1 is prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 10, 12, 14, 24, 34, 37, 52, 56, 65, 68, 96, 106, 128, 156, 169, 236, 254, 481, 618, 641, 672, 700, 774, 1274, 1625, 1841, 4650, 6030, 8372, 8760, 9173, 12776, 13873, 25214, 25548, 33834, 72005
Offset: 1

Views

Author

Parthasarathy Nambi, Aug 04 2006

Keywords

Examples

			If k=96 then 22*3^k + 1 is a prime with 48 digits.
		

Crossrefs

Cf. A003306.

Programs

Extensions

More terms from Stefan Steinerberger, Aug 06 2006
a(32)-a(41) from Michael S. Branicky, Jul 14 2023
a(42) from Michael S. Branicky, Oct 24 2024

A136041 Largest prime p such that phi^n(p) = 2, where phi^n means n iterations of Euler's totient function.

Original entry on oeis.org

3, 7, 19, 43, 163, 487, 1459, 3079, 8803, 39367, 78787, 196831, 581743, 2125819, 6381667, 19131877, 86093443, 258280327, 516560659, 1214874127
Offset: 1

Views

Author

T. D. Noe, Dec 12 2007

Keywords

Comments

The largest prime in row n+1 of A058812. From Shapiro, we know that a(n) <= 1 + 2*3^(n-1). This bound is attained for n=1,2,3,5,6,7,17,18,.., which is n=A003306(k)+1 for k=1,2,3,...

Programs

  • Mathematica
    nn=20; pk=Table[0,{nn}]; Do[p=Prime[n]; k=Length[NestWhileList[EulerPhi,p,#>2&]]-1; If[0
    				

A176351 Numbers n such that 2*3^n + 1 is a primitive prime factor of 10^3^n - 1.

Original entry on oeis.org

4, 180, 320, 5480, 12096, 17720, 82780, 1175232
Offset: 1

Views

Author

T. D. Noe, Apr 15 2010

Keywords

Comments

Consider the problem of finding the smallest number k such that the decimal representation of 1/k has period 3^e for a given e. The number k is usually 3^(e+2). However, if e is one of the n in this sequence, then the prime 2*3^n+1 is a smaller k. The first instance of these exceptions is 1/163, which has a period of 81.
Subsequence of A003306.
10 must be a square residue modulo 2*3^n + 1, implying that n must be a multiple of 4.

Crossrefs

Cf. A003306 (primes of the form 2*3^n+1), A003060 (least k such that 1/k has period n).

Programs

  • Mathematica
    Select[Range[10000], PrimeQ[1+2*3^# ] && MultiplicativeOrder[10,1+2*3^# ] == 3^# &]

Extensions

Two more terms from Max Alekseyev, May 03 2010

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

A326655 Numbers k such that 3*4^k+1 is prime.

Original entry on oeis.org

1, 3, 4, 6, 9, 15, 18, 33, 138, 204, 219, 267, 1104, 1408, 1584, 1956, 17175, 21147, 24075, 27396, 27591, 40095, 354984, 400989, 916248, 1145805, 2541153, 5414673
Offset: 1

Views

Author

Richard N. Smith, Jul 16 2019

Keywords

Comments

One half of the even terms in A002253.

Crossrefs

Numbers k such that r*(r+1)^k+1 is prime: A003306 (r=2), this sequence (r=3), A204322 (r=4), A247260 (r=5), A245241 (r=6), A269544 (r=7), A056799 (r=8), A056797 (r=9), A057462 (r=10), A251259 (r=11).

A334993 Numbers k such that 2*3^k + 1 is prime and divides Phi(3^m, 2).

Original entry on oeis.org

1, 5, 9, 17, 57, 65, 897, 4217, 6225, 152529, 3648969, 5570081
Offset: 1

Views

Author

Serge Batalov, May 18 2020

Keywords

Comments

A subset of odd values from A003306.
If p = 2*3^k + 1 is prime then p divides 2^(3^k) + (-1)^k, due to Euler's criterion.
Only odd terms of sequence A003306 can divide the cyclotomic expression Phi(3^m, 2); none of the even terms of sequence A003306 can divide 2^3^k-1 and therefore cannot divide Phi(3^m, 2).

Crossrefs

Cf. A003306.

Programs

  • PARI
    dp(n)=Mod(2,2*3^n+1)^3^n==1;
    forstep(n=1,6225,2,if(dp(n),print1(n,", ")))
Previous Showing 11-20 of 21 results. Next