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

A125611 a(n) is the smallest prime p such that 7^n divides p^6 - 1.

Original entry on oeis.org

2, 19, 19, 3449, 32261, 152617, 3294173, 3376853, 135967277, 135967277, 7909306973, 92233439147, 115385868869, 1356446145697, 56020344873707, 56020344873707, 930522055948829, 9116268492336169, 10744682090246617
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Comments

a(n) is the smallest 6th root of unity (mod 7^n) that is prime. - Robert Israel, Jan 14 2024

Crossrefs

Programs

  • Maple
    f:= proc(n) local R, r, i;
      R:= sort(map(rhs@op, [msolve(x^6=1, 7^n)]));
      for i from 0 do
        for r in R do
          if isprime(7^n * i + r) then return 7^n * i + r fi
      od od;
    end proc:
    map(f, [$1..30]); # Robert Israel, Jan 14 2024
  • PARI
    \\ See A125609
    
  • Python
    from itertools import count
    from sympy import nthroot_mod, isprime
    def A125611(n):
        m = 7**n
        r = sorted(nthroot_mod(1,6,m,all_roots=True))
        for i in count(0,m):
            for p in r:
                if isprime(i+p): return i+p # Chai Wah Wu, May 02 2024

Extensions

More terms from Ryan Propper, Jan 03 2007
More terms from Martin Fuller, Jan 11 2007

A125609 Smallest prime p such that 3^n divides p^2 - 1.

Original entry on oeis.org

2, 17, 53, 163, 487, 1459, 4373, 13121, 39367, 472391, 1062881, 1062881, 19131877, 19131877, 57395627, 86093443, 258280327, 3874204891, 6973568801, 6973568801, 188286357653, 188286357653, 188286357653, 4518872583697, 15251194969973
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Comments

Smallest prime of the form k*3^n-1 or k*3^n+1. - Robert Israel, Oct 27 2019

Crossrefs

Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125610 = Smallest prime p such that 5^n divides p^4 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125612 = Smallest prime p such that 11^n divides p^10 - 1. Cf. A125632 = Smallest prime p such that 13^n divides p^12 - 1. Cf. A125633 = Smallest prime p such that 17^n divides p^16 - 1. Cf. A125634 = Smallest prime p such that 19^n divides p^18 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1.

Programs

  • Maple
    f:= proc(n) local k;
          for k from 1 do
            if isprime(k*3^n-1) then return k*3^n-1
            elif isprime(k*3^n+1) then return k*3^n+1
            fi
          od
    end proc:
    map(f, [$1..30]); # Robert Israel, Oct 27 2019
  • Mathematica
    f[n_] := Module[{k}, For[k = 1, True, k++, If[PrimeQ[k*3^n-1], Return[k*3^n-1], If[PrimeQ[k*3^n+1], Return[k*3^n+1]]]]];
    Array[f, 30] (* Jean-François Alcover, Jun 04 2020, after Maple *)
  • PARI
    \\ See link.

Extensions

Corrected and extended by Ryan Propper, Jan 01 2007
More terms from Martin Fuller, Jan 11 2007

A125610 Smallest prime p such that 5^n divides p^4 - 1.

Original entry on oeis.org

2, 7, 193, 443, 14557, 14557, 735443, 3124999, 7812499, 78124999, 292968749, 853235443, 2441406251, 53834264557, 122070312499, 202513391693, 1118040735443, 3459595983307, 3459595983307, 270488404577057
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Crossrefs

Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125612 = Smallest prime p such that 11^n divides p^10 - 1. Cf. A125632 = Smallest prime p such that 13^n divides p^12 - 1. Cf. A125633 = Smallest prime p such that 17^n divides p^16 - 1. Cf. A125634 = Smallest prime p such that 19^n divides p^18 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1.

Programs

  • Maple
    f:= proc(n) local k, p2,P,t;
        p2:= numtheory:-msqrt(-1,5^n);
        P:= sort([1,p2,5^n-p2,5^n-1]);
        for k from 0 do
          for t in P do
            if isprime(k*5^n+t) then return k*5^n+t fi
        od od:
    end proc:
    map(f, [$1..30]); # Robert Israel, Oct 27 2019
  • PARI
    \\ See A125609 - Martin Fuller, Jan 11 2007

Extensions

More terms from Ryan Propper, Jan 02 2007
More terms from Martin Fuller, Jan 11 2007

A125612 a(n) is the smallest prime p such that 11^n divides p^10 - 1.

Original entry on oeis.org

2, 3, 2663, 45989, 275393, 2120879, 28723679, 174625993, 4715895383, 24262286441, 1194631280321, 3143820659087, 138090848575723, 488581592070877, 6266190914259137, 367597838908577287, 10866698414795559631, 19697814061539637951, 19697814061539637951, 3824465353837845574717, 14852046860008834240157
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Comments

a(n) is the smallest 10th root of unity (mod 11^n) that is prime. - Robert Israel, Jan 14 2024

Crossrefs

Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125610 = Smallest prime p such that 5^n divides p^4 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125632 = Smallest prime p such that 13^n divides p^12 - 1. Cf. A125633 = Smallest prime p such that 17^n divides p^16 - 1. Cf. A125634 = Smallest prime p such that 19^n divides p^18 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1.

Programs

  • Maple
    f:= proc(n) local R,r,i;
      R:= sort(map(rhs@op, [msolve(x^10=1, 11^n)]));
      for i from 0 do
        for r in R do
          if isprime(11^n * i + r) then return 11^n * i + r fi
      od od;
    end proc:
    map(f, [$1..20]); # Robert Israel, Jan 14 2024
  • Mathematica
    spp[n_]:=Module[{p=2,c=11^n},While[PowerMod[p,10,c]!=1,p=NextPrime[p]];p]; Array[spp,16] (* Harvey P. Dale, Aug 08 2019 *)
  • PARI
    \\ See A125609
    
  • Python
    from itertools import count
    from sympy import nthroot_mod, isprime
    def A125612(n):
        m = 11**n
        r = sorted(nthroot_mod(1,10,m,all_roots=True))
        for i in count(0,m):
            for p in r:
                if isprime(i+p): return i+p # Chai Wah Wu, May 02 2024

Extensions

More terms from Ryan Propper, Jan 03 2007
More terms from Martin Fuller, Jan 11 2007
More terms from Robert Israel, Jan 14 2024

A125632 Smallest prime p such that 13^n divides p^12 - 1.

Original entry on oeis.org

2, 19, 239, 239, 220861, 7654109, 533810141, 533810141, 822557039, 38050596989, 2395794301259, 58713568184837, 358661570404751, 22771419458231473, 65106791321062951, 1951482088631313647, 13942901952235522979
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Crossrefs

Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125610 = Smallest prime p such that 5^n divides p^4 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125612 = Smallest prime p such that 11^n divides p^10 - 1. Cf. A125633 = Smallest prime p such that 17^n divides p^16 - 1. Cf. A125634 = Smallest prime p such that 19^n divides p^18 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1.

Programs

Extensions

More terms from Martin Fuller, Jan 11 2007

A125633 Smallest prime p such that 17^n divides p^16 - 1.

Original entry on oeis.org

2, 131, 653, 15541, 15541, 24527681, 38277341, 16048035481, 48718117843, 5498076927457, 38413406256881, 2359162908109223, 44510586506850631, 346100334752156863, 12132548193910221893, 201533461539194779193
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Crossrefs

Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125610 = Smallest prime p such that 5^n divides p^4 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125612 = Smallest prime p such that 11^n divides p^10 - 1. Cf. A125632 = Smallest prime p such that 13^n divides p^12 - 1. Cf. A125634 = Smallest prime p such that 19^n divides p^18 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1.

Programs

Extensions

More terms from Martin Fuller, Jan 11 2007

A125634 Smallest prime p such that 19^n divides p^18 - 1.

Original entry on oeis.org

2, 127, 2819, 2819, 2342959, 2342959, 47579927, 3620189879, 513127081109, 8388044818849, 77460384757423, 2649283656602003, 252317900773542353, 2467410166021233673, 50407811312994280933, 179869204428830533411
Offset: 1

Views

Author

Alexander Adamchuk, Nov 28 2006

Keywords

Crossrefs

Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125610 = Smallest prime p such that 5^n divides p^4 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125612 = Smallest prime p such that 11^n divides p^10 - 1. Cf. A125632 = Smallest prime p such that 13^n divides p^12 - 1. Cf. A125633 = Smallest prime p such that 17^n divides p^16 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1.

Programs

Extensions

More terms from Martin Fuller, Jan 11 2007

A125645 Smallest odd prime base q such that p^4 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

17, 163, 443, 3449, 45989, 239, 15541, 2819, 60793, 78017, 690143, 398023, 1977343, 574081, 1513367, 4388179, 3198427, 8065789, 3246107, 1353383, 5934307, 15631613, 2864371, 14754769, 15012733, 1358891, 32414783, 119551, 21860063, 11281097
Offset: 1

Views

Author

Alexander Adamchuk, Nov 29 2006

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local p, r, S,i,s,t;
      uses numtheory;
      p:= ithprime(n);
      r:= primroot(p^4);
      S:= sort([seq(r &^ (i*p^3) mod p^4, i=0..p-2)]);
      for i from 0 do
        for s in S do
          t:= i*p^4+s;
          if t::odd and isprime(t) then return t fi
      od od
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Feb 12 2017
  • PARI
    { a(n) = local(p,x,y); if(n==1,return(17)); p=prime(n); x=znprimroot(p^4)^(p^3); vecsort( vector(p-1,i, y=lift(x^i);while(!isprime(y),y+=p^4);y ) )[1] } \\ Max Alekseyev, May 30 2007

Extensions

More terms from Max Alekseyev, May 30 2007

A125646 Smallest odd prime base q such that p^5 divides q^(p-1) - 1, where p = prime(n).

Original entry on oeis.org

97, 487, 14557, 32261, 275393, 220861, 15541, 2342959, 1051847, 24639193, 40373093, 70697317, 31851901, 47289133, 456330179, 10000453, 154075723, 130702609, 304154189, 143584109, 183298237, 79451167, 1058782027, 352845203, 567620413, 4592184511, 5890772963, 9651540247, 4081988041, 4772484029
Offset: 1

Views

Author

Alexander Adamchuk, Nov 29 2006

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,k,j,q,R;
      p:= ithprime(n);
      R:= sort(map(rhs@op, [msolve(q^(p-1)-1, p^5)]));
      for k from 0 do
        for j in R do
          q:= k*p^5+j;
          if isprime(q) then return q fi;
        od
     od
    end proc:
    map(f, [$1..100]); # Robert Israel, Apr 11 2019
  • Mathematica
    Do[p = Prime[n]; q = 2; While[PowerMod[q, p-1, p^5] != 1, q = NextPrime[q]]; Print[q], {n, 100}] (* Ryan Propper, Mar 31 2007 *)
  • PARI
    { a(n) = local(p,x,y); if(n==1,return(97)); p=prime(n); x=znprimroot(p^5)^(p^4); vecsort( vector(p-1,i, y=lift(x^i);while(!isprime(y),y+=p^5);y ) )[1] } \\ Max Alekseyev, May 30 2007
    
  • Python
    from itertools import count
    from sympy import nthroot_mod, isprime, prime
    def A125646(n):
        m = (p:=prime(n))**5
        r = sorted(nthroot_mod(1,p-1,m,all_roots=True))
        for i in count(0,m):
            for a in r:
                if isprime(i+a): return i+a # Chai Wah Wu, May 02 2024

Extensions

More terms from Ryan Propper, Mar 31 2007
More terms from Max Alekseyev, May 30 2007

A125648 Smallest odd prime base q such that p^7 divides q^(p-1) - 1, where p = Prime[n].

Original entry on oeis.org

257, 4373, 735443, 3294173, 28723679, 533810141, 38277341, 47579927, 982740799, 33956348611, 77141582851, 174329354539, 82984891817, 109051450427, 83209719751, 1352085061013, 171168499897, 1822904926391, 2870322429133, 3589197993463, 2603594622571, 5834621843669, 1411025860033, 20635686238253, 1580041060459, 26763849212297, 8216934406781, 28482190726739, 97876187600351
Offset: 1

Views

Author

Alexander Adamchuk, Nov 29 2006

Keywords

Crossrefs

Programs

  • PARI
    { a125648(n) = my(p, x, r); if(n==1, return(257)); p=prime(n); x=znprimroot(p^7)^(p^6); vecmin( vector(p-1, i, forprimestep(y=2,oo,x^i,r=y;break); r) ); } \\ Max Alekseyev, May 30 2007; updated Apr 01 2025

Extensions

More terms from Max Alekseyev, May 30 2007
Showing 1-10 of 19 results. Next