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

A085398 Let Cn(x) be the n-th cyclotomic polynomial; a(n) is the least k>1 such that Cn(k) is prime.

Original entry on oeis.org

3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 6, 2, 4, 3, 2, 10, 2, 22, 2, 2, 4, 6, 2, 2, 2, 2, 2, 14, 3, 61, 2, 10, 2, 14, 2, 15, 25, 11, 2, 5, 5, 2, 6, 30, 11, 24, 7, 7, 2, 5, 7, 19, 3, 2, 2, 3, 30, 2, 9, 46, 85, 2, 3, 3, 3, 11, 16, 59, 7, 2, 2, 22, 2, 21, 61, 41, 7, 2, 2, 8, 5, 2, 2
Offset: 1

Views

Author

Don Reble, Jun 28 2003

Keywords

Comments

Conjecture: a(n) is defined for all n. - Eric Chen, Nov 14 2014
Existence of a(n) is implied by Bunyakovsky's conjecture. - Robert Israel, Nov 13 2014

Examples

			a(11) = 5 because C11(k) is composite for k = 2, 3, 4 and prime for k = 5.
a(37) = 61 because C37(k) is composite for k = 2, 3, 4, ..., 60 and prime for k = 61.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
    for k from 2 do if isprime(numtheory:-cyclotomic(n,k)) then return k fi od
    end proc:
    seq(f(n), n = 1 .. 100); # Robert Israel, Nov 13 2014
  • Mathematica
    Table[k = 2; While[!PrimeQ[Cyclotomic[n, k]], k++]; k, {n, 300}] (* Eric Chen, Nov 14 2014 *)
  • PARI
    a(n) = k=2; while(!isprime(polcyclo(n, k)), k++); k; \\ Michel Marcus, Nov 13 2014

Formula

a(A072226(n)) = 2. - Eric Chen, Nov 14 2014
a(n) = A117544(n) except when n is a prime power, since if n is a prime power, then A117544(n) = 1. - Eric Chen, Nov 14 2014
a(prime(n)) = A066180(n), a(2*prime(n)) = A103795(n), a(2^n) = A056993(n-1), a(3^n) = A153438(n-1), a(2*3^n) = A246120(n-1), a(3*2^n) = A246119(n-1), a(6^n) = A246121(n-1), a(5^n) = A206418(n-1), a(6*A003586(n)) = A205506(n), a(10*A003592(n)) = A181980(n).

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

Original entry on oeis.org

1, 2, 3, 8, 11, 20, 21, 26, 30, 50, 51, 56, 60, 78, 98, 102, 117, 129, 134, 146, 159, 171, 186, 189, 191, 198, 200, 209, 210, 212, 222, 240, 249, 267, 269, 278, 279, 299, 300, 333, 344, 363, 383, 390, 398, 399, 425, 429, 438, 444, 450, 458, 504, 509, 533, 540
Offset: 1

Views

Author

Pierre CAMI, Dec 26 2008

Keywords

Comments

n^6+n^3+1 is the cyclotomic polynomial Phi(9,n). Damianou, p. 4, claims that there is strong experimental evidence that k^6 + k^3 + 1 is prime for infinitely many values of k. - Jonathan Vos Post, Jan 06 2011 [Comment corrected by Jon E. Schoenfield, Jan 22 2018]

Crossrefs

Programs

Extensions

Some unclear comments deleted by N. J. A. Sloane, Sep 06 2009
More terms from Vincenzo Librandi, Mar 25 2010

A153440 Numbers k such that k^9*(k^9+1)+1 is prime.

Original entry on oeis.org

1, 2, 11, 44, 45, 56, 62, 63, 110, 170, 219, 234, 245, 261, 263, 333, 395, 398, 402, 413, 428, 434, 437, 498, 557, 558, 578, 633, 692, 695, 723, 731, 750, 761, 774, 794, 797, 804, 806, 846, 854, 855, 863, 906, 923, 926, 977, 1046, 1085, 1086
Offset: 1

Views

Author

Pierre CAMI, Dec 26 2008

Keywords

Comments

It seems numbers of the form k^n*(k^n+1)+1 with n > 0, k > 1 may be primes only if n has the form 3^j. When n is even, k^(4*n)+k^(2*n)+1=(k^(2*n)+1)^2-(k^n)^2=(k^(2*n)+k^n+1)*(k^(2*n)-k^n+1) so composite. But why if n odd > 3 and not a power of 3, k^n*(k^n+1)+1 is always composite?

Crossrefs

Cf. A153438.

Programs

  • Magma
    [n: n in [0..1100] | IsPrime(n^9*(n^9+1)+1)]; // Vincenzo Librandi, Jan 17 2015
  • Mathematica
    k9pQ[n_]:=Module[{c=n^9},PrimeQ[c(c+1)+1]]; Select[Range[1200],k9pQ] (* Harvey P. Dale, Oct 29 2014 *)
    Select[Range[1100], PrimeQ[(#^9 (#^9 + 1)) + 1] &] (* Vincenzo Librandi, Jan 17 2015 *)

A205506 Least positive integer m > 1 such that 1 - m^k + m^(2*k) is prime, where k=A003586(n).

Original entry on oeis.org

2, 2, 6, 2, 3, 5, 7, 3, 4, 3, 6, 93, 2, 88, 5, 33, 5, 196, 15, 106, 174, 196, 14, 342, 207, 28, 372, 14, 47, 25, 569, 646, 141, 129, 278, 5, 421, 224, 629, 26, 424, 1081, 688, 246, 736, 4392, 124, 484, 759, 791, 4401, 863, 2854, 410, 1044, 22, 848, 1402, 2006
Offset: 1

Views

Author

Lei Zhou, Feb 01 2012

Keywords

Comments

1 - m^k + m^(2*k) equals Phi(6*k,m) when k=2^p*3^q, p>=0, q>=0, which may be prime numbers for certain positive integer m>1.
The Mathematica program given here generates the first 33 terms. Further terms were generated by OpenPFGW.
a(62)=7426, while A003586(62)=3^8=6561.

Examples

			n=1, A003586(1)=1, when m=2, 1-2^1+2^2=3 is prime, so a(1)=2;
n=2, A003586(2)=2, when m=2, 1-2^2+2^4=13 is prime, so a(2)=2;
...
n=7, A003586(7)=9, when m=7, 1-7^9+7^18=1628413557556843 is prime, so a(7)=7.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := n == 3 EulerPhi@n; a = Select[6 Range@500, fQ]/6; l =
    Length[a]; Table[m = a[[j]]; i = 1;
    While[i++; cp = 1 - i^m + i^(2*m); ! PrimeQ[cp]]; i, {j, 1, l}]
  • Python
    from itertools import count
    from sympy import isprime, integer_log
    def A205506(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1))
        k = bisection(f,n,n)
        return next(filter(lambda m:isprime(1-m**k+m**(k<<1)),count(2))) # Chai Wah Wu, Oct 22 2024

Formula

a(n) = A085398(6*A003586(n)). - Jinyuan Wang, Jan 01 2023
a(n) is smallest positive m such that Phi(A033845(n),m) is prime. - Chai Wah Wu, Sep 16 2024

A153436 a(n) is the least k such that k^n*(k^n+1)-1 is prime.

Original entry on oeis.org

2, 2, 2, 2, 4, 2, 10, 4, 3, 2, 6, 3, 4, 21, 12, 2, 30, 3, 5, 47, 31, 34, 27, 2, 31, 2, 50, 5, 20, 23, 89, 29, 179, 11, 2, 16, 41, 96, 75, 22, 55, 10, 209, 46, 38, 17, 34, 7, 61, 121, 119, 2, 68, 148, 2, 164, 216, 65, 527, 11, 175, 354, 442, 201, 54, 230, 97, 433, 3
Offset: 1

Views

Author

Pierre CAMI, Dec 26 2008

Keywords

Crossrefs

Programs

  • PARI
    a(n) = {my(k=1); while (! isprime(k^n*(k^n+1)-1), k++); k;}

Extensions

Name corrected by Michel Marcus, Sep 24 2019

A153441 Numbers k such that k^27*(k^27+1)+1 is prime.

Original entry on oeis.org

1, 21, 50, 77, 153, 191, 194, 311, 405, 440, 462, 557, 638, 659, 690, 746, 852, 887, 944, 945, 1140, 1326, 1344, 1452, 1463, 1607, 1632, 1652, 1659, 1683, 1710, 1788, 1812, 1851, 1925, 1943, 1992, 2157, 2294, 2309, 2352, 2402, 2621, 2687, 2700, 2733, 2756
Offset: 1

Views

Author

Pierre CAMI, Dec 26 2008

Keywords

Comments

It seems numbers of the form k^n*(k^n+1)+1 with n > 0, k > 1 may be primes only if n has the form 3^j. When n is even, k^(4*n)+k^(2*n)+1=(k^(2*n)+1)^2-(k^n)^2=(k^(2*n)+k^n+1)*(k^(2*n)-k^n+1) so composite. But why if n odd > 3 and not a power of 3, k^n*(k^n+1)+1 is always composite ??

Crossrefs

Cf. A153438.

Programs

  • PARI
    isok(k)  = isprime(k^27*(k^27+1)+1); \\ Michel Marcus, Sep 20 2019

A153442 Numbers k such that k^81*(k^81+1)+1 is prime.

Original entry on oeis.org

1, 209, 210, 842, 1176, 1358, 1370, 1608, 1707, 1845, 1850, 2594, 2880, 2882, 3123, 3384, 4085, 4457, 4469, 4808, 5090, 5186, 5516, 5529, 5867, 5991, 6123, 6144, 6606, 6906, 7001, 7019, 7119, 7430, 7541, 7719, 8031, 8463, 8471, 8486, 8595, 8609, 8627
Offset: 1

Views

Author

Pierre CAMI, Dec 26 2008

Keywords

Comments

It seems numbers of the form k^n*(k^n+1)+1 with n > 0, k > 1 may be primes only if n has the form 3^j. When n is even, k^(4*n)+k^(2*n)+1=(k^(2*n)+1)^2-(k^n)^2=(k^(2*n)+k^n+1)*(k^(2*n)-k^n+1) so composite. But why if n odd > 3 and not a power of 3, k^n*(k^n+1)+1 is always composite?

Crossrefs

Cf. A153438.

Programs

  • Mathematica
    k81Q[k_]:=Module[{k81=k^81},PrimeQ[k81(k81+1)+1]]; Select[Range[9000], k81Q] (* Harvey P. Dale, Aug 28 2011 *)
    Select[Range[9000], PrimeQ[(#^81 (#^81 + 1)) + 1] &] (* Vincenzo Librandi, Jan 17 2015 *)

A246119 a(n) is the least k such that k^(2^n)*(k^(2^n) - 1) + 1 is prime.

Original entry on oeis.org

2, 2, 2, 5, 4, 2, 5, 196, 14, 129, 424, 484, 22, 5164, 7726, 13325, 96873, 192098, 712012, 123447
Offset: 0

Views

Author

Serge Batalov, Aug 14 2014

Keywords

Comments

Numbers of the form k^m*(k^m-1)+1 with m > 0, k > 1 may be primes only if m is 3-smooth, because these numbers are Phi(6,k^m) and cyclotomic factorizations apply to any prime divisors >3. This series is a subset of A205506 with only m=2^n.
Trivially, a(n) <= a(n+1)^2. This upper bound, indeed, holds for a(4) = a(5)^2, a(7) = a(8)^2 and a(11) = a(12)^2.
The numbers of this form are Generalized Unique primes (see Links section).
a(16)=96873 corresponds to a prime with 653552 decimal digits.
The search for a(17) which corresponds to a 1385044-decimal digit prime was performed on a small Amazon EC2 cloud farm (40 GRID K520 GPUs), at a cost of approximately $1000 over three weeks.
a(18) <= 712012 corresponds to a prime with 3068389 decimal digits. - Serge Batalov, Jan 15 2018
a(19) <= 123447 corresponds to a prime with 5338805 decimal digits. - Serge Batalov, Jan 15 2018
a(20) <= 465859 corresponds to a prime with 11887192 decimal digits (not all lower candidates have been checked). This is the largest known non-Mersenne prime at the time of its discovery. - Serge Batalov, May 31 2023

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range@ 200, PrimeQ[#^(2^n) (#^(2^n) - 1) + 1] &], {n, 0, 9}] (* Michael De Vlieger, Jan 15 2018 *)
  • PARI
    a(n)=k=1;while(!ispseudoprime(k^(2^n)*(k^(2^n)-1)+1),k++);k
    n=0;while(n<100,print1(a(n),", ");n++) \\ Derek Orr, Aug 14 2014

Formula

a(n) = A085398(3*2^(n+1)). - Jinyuan Wang, Jan 01 2023

Extensions

a(16) from Serge Batalov, Dec 30 2014
a(17) from Serge Batalov, Feb 10 2015
a(18-19) from Serge Batalov, May 31 2023

A246120 Least k such that k^(3^n)*(k^(3^n) - 1) + 1 is prime.

Original entry on oeis.org

2, 6, 7, 93, 15, 372, 421, 759, 7426, 9087
Offset: 0

Views

Author

Serge Batalov, Aug 14 2014

Keywords

Comments

Numbers of the form k^m*(k^m - 1) + 1 with m > 0, k > 1 may be primes only if m is 3-smooth, because these numbers are Phi(6,k^m) and cyclotomic factorizations apply to any prime divisors > 3. This sequence is a subset of A205506 with only m=3^n, which is similar to A153438.
Search limits: a(10) > 35000, a(11) > 3500.

Examples

			When k = 7, k^18 - k^9 + 1 is prime. Since this isn't prime for k < 7, a(2) = 7.
		

Crossrefs

Programs

  • Mathematica
    a246120[n_Integer] := Module[{k = 1},
      While[! PrimeQ[k^(3^n)*(k^(3^n) - 1) + 1], k++]; k]; a246120 /@ Range[0, 9] (* Michael De Vlieger, Aug 15 2014 *)
  • PARI
    a(n)=k=1;while(!ispseudoprime(k^(3^n)*(k^(3^n)-1)+1),k++);k
    n=0;while(n<100,print1(a(n),", ");n++) \\ Derek Orr, Aug 14 2014

Formula

a(n) = A085398(2*3^(n+1)). - Jinyuan Wang, Jan 01 2023

A246121 Least k such that k^(6^n)*(k^(6^n) - 1) + 1 is prime.

Original entry on oeis.org

2, 3, 88, 28, 688, 7003, 1925
Offset: 0

Views

Author

Serge Batalov, Aug 14 2014

Keywords

Comments

Numbers of the form k^m*(k^m - 1) + 1 with m > 0, k > 1 may be primes only if m is 3-smooth, because these numbers are Phi(6,k^m) and cyclotomic factorizations apply to any prime divisors > 3. This sequence is a subset of A205506 with only m=6^n.
Numbers of this form are Generalized unique primes. a(6) generates a 306477-digit prime.

Examples

			When k = 88, k^72 - k^36 + 1 is prime. Since this isn't prime for k < 88, a(2) = 88.
		

Crossrefs

Programs

  • PARI
    a(n)=k=1; while(!ispseudoprime(k^(6^n)*(k^(6^n)-1)+1), k++); k
    n=0; while(n<100, print1(a(n), ", "); n++)

Formula

a(n) = A085398(6^(n+1)). - Jinyuan Wang, Jan 01 2023

Extensions

a(6) from Serge Batalov, Aug 15 2014
Showing 1-10 of 13 results. Next