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 10 results.

A257833 Table T(k, n) of smallest bases b > 1 such that p = prime(n) satisfies b^(p-1) == 1 (mod p^k), read by antidiagonals.

Original entry on oeis.org

5, 8, 9, 7, 26, 17, 18, 57, 80, 33, 3, 18, 182, 242, 65, 19, 124, 1047, 1068, 728, 129, 38, 239, 1963, 1353, 1068, 2186, 257, 28, 158, 239, 27216, 34967, 32318, 6560, 513, 28, 333, 4260, 109193, 284995, 82681, 110443, 19682, 1025, 14, 42, 2819, 15541, 861642, 758546, 2387947, 280182, 59048, 2049
Offset: 2

Views

Author

Felix Fröhlich, May 10 2015

Keywords

Examples

			T(3, 5) = 124, since prime(5) = 11 and the smallest b such that b^10 == 1 (mod 11^3) is 124.
Table starts
  k\n|    1     2       3        4       5       6         7
  ---+----------------------------------------------------------
   2 |    5     8       7       18       3      19        38 ...
   3 |    9    26      57       18     124     239       158 ...
   4 |   17    80     182     1047    1963     239      4260 ...
   5 |   33   242    1068     1353   27216  109193     15541 ...
   6 |   65   728    1068    34967  284995  861642    390112 ...
   7 |  129  2186   32318    82681  758546 6826318  21444846 ...
   8 |  257  6560  110443  2387947 9236508 6826318 112184244 ...
   9 |  513 19682  280182 14906455 ....
  10 | 1025 59048 3626068 ....
  ...
		

Crossrefs

Column 1 of table is A000051.
Column 2 of table is A024023 (with offset 2).
Column 3 of table is A034939 (with offset 2).

Programs

  • PARI
    for(k=2, 10, forprime(p=2, 25, b=2; while(Mod(b, p^k)^(p-1)!=1, b++); print1(b, ", ")); print(""))
    
  • PARI
    T(k,n) = my(p=prime(n), v=List([2])); if(n==1, return(2^k+1)); for(i=1, k, w=List([]); for(j=1, #v, forstep(b=v[j], p^i-1, p^(i-1), if(Mod(b, p^i)^p==b, listput(w, b)))); v=Vec(w)); vecmin(v); \\ Jinyuan Wang, May 17 2022
    
  • Python
    from itertools import count, islice
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A257833_T(n,k): return 2**k+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**k,True)[1])
    def A257833_gen(): # generator of terms
        yield from (A257833_T(n,i-n+2) for i in count(1) for n in range(i,0,-1))
    A257833_list = list(islice(A257833_gen(),50)) # Chai Wah Wu, May 17 2022

A353937 Smallest b > 1 such that b^(p-1) == 1 (mod p^4) for p = prime(n).

Original entry on oeis.org

17, 80, 182, 1047, 1963, 239, 4260, 2819, 19214, 2463, 15714, 51344, 20677, 3038, 224444, 189323, 11550, 397575, 201305, 15384, 840838, 1372873, 1576656, 278454, 1721322, 48072, 281007, 119551, 252595, 1001934, 3489507, 2489004, 598987, 3082551, 6136759, 3928984
Offset: 1

Views

Author

Felix Fröhlich, May 12 2022

Keywords

Crossrefs

Row k = 4 of A257833.
Cf. similar sequences for p^k: A039678 (k=2), A249275 (k=3), A353938 (k=5), A353939 (k=6), A353940 (k=7), A353941 (k=8), A353942 (k=9), A353943 (k=10).

Programs

  • Maple
    f:= proc(j) local p,b,i;
      p:= ithprime(j);
      b:= numtheory:-primroot(p^4) &^ (p^3) mod p^4;
      min(seq(b &^i mod p^4, i=1..p-2))
    end proc:
    f(1):= 17:
    map(f, [$1..40]); # Robert Israel, Dec 19 2024
  • Mathematica
    a[n_] := Module[{p = Prime[n], b = 2}, While[PowerMod[b, p - 1, p^4] != 1, b++]; b]; Array[a, 20] (* Amiram Eldar, May 12 2022 *)
  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^4)^(p-1)==1, return(b)))
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A353937(n): return 2**4+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**4,True)[1]) # Chai Wah Wu, May 17 2022

A353938 Smallest b > 1 such that b^(p-1) == 1 (mod p^5) for p = prime(n).

Original entry on oeis.org

33, 242, 1068, 1353, 27216, 109193, 15541, 133140, 495081, 1115402, 2754849, 1353359, 649828, 3228564, 2359835, 4694824, 7044514, 28538377, 1111415, 77588426, 16178110, 2553319, 9571390, 158485540, 18664438, 146773512, 45639527, 448251412, 48834112, 141076650
Offset: 1

Views

Author

Felix Fröhlich, May 12 2022

Keywords

Crossrefs

Row k = 5 of A257833.
Cf. similar sequences for p^k: A039678 (k=2), A249275 (k=3), A353937 (k=4), A353939 (k=6), A353940 (k=7), A353941 (k=8), A353942 (k=9), A353943 (k=10).

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n], b = 2}, While[PowerMod[b, p - 1, p^5] != 1, b++]; b]; Array[a, 12] (* Amiram Eldar, May 12 2022 *)
  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^5)^(p-1)==1, return(b)))
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A353938(n): return 2**5+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**5,True)[1]) # Chai Wah Wu, May 17 2022

A353939 Smallest b > 1 such that b^(p-1) == 1 (mod p^6) for p = prime(n).

Original entry on oeis.org

65, 728, 1068, 34967, 284995, 861642, 390112, 333257, 2818778, 42137700, 8078311, 33518159, 92331463, 21583010, 138173066, 8202731, 390421192, 1006953931, 77622331, 270657300, 5915704483, 522911165, 2507851273, 1329885769, 2789067613, 3987072867, 7938255646
Offset: 1

Views

Author

Felix Fröhlich, May 12 2022

Keywords

Crossrefs

Row k = 6 of A257833.
Cf. similar sequences for p^k: A039678 (k=2), A249275 (k=3), A353937 (k=4), A353938 (k=5), A353940 (k=7), A353941 (k=8), A353942 (k=9), A353943 (k=10).

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n], b = 2}, While[PowerMod[b, p - 1, p^6] != 1, b++]; b]; Array[a, 9] (* Amiram Eldar, May 12 2022 *)
  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^6)^(p-1)==1, return(b)))
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A353939(n): return 2**6+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**6,True)[1]) # Chai Wah Wu, May 17 2022

Extensions

a(25)-a(27) from Jinyuan Wang, May 17 2022

A353940 Smallest b > 1 such that b^(p-1) == 1 (mod p^7) for p = prime(n).

Original entry on oeis.org

129, 2186, 32318, 82681, 758546, 6826318, 21444846, 44702922, 178042767, 393747520, 1548729003, 4741156070, 2203471139, 3242334565, 16609835418, 114175761515, 30338830655, 20115543070, 114457309347, 370162324382, 57877856575, 12692933349, 280646695286, 127762186531
Offset: 1

Views

Author

Felix Fröhlich, May 12 2022

Keywords

Crossrefs

Row k = 7 of A257833.
Cf. similar sequences for p^k: A039678 (k=2), A249275 (k=3), A353937 (k=4), A353938 (k=5), A353939 (k=6), A353941 (k=8), A353942 (k=9), A353943 (k=10).

Programs

  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^7)^(p-1)==1, return(b)))
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A353940(n): return 2**7+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**7,True)[1]) # Chai Wah Wu, May 17 2022

Extensions

a(9)-a(11) from Amiram Eldar, May 12 2022
More terms from Jinyuan Wang, May 17 2022

A353941 Smallest b > 1 such that b^(p-1) == 1 (mod p^8) for p = prime(n).

Original entry on oeis.org

257, 6560, 110443, 2387947, 9236508, 6826318, 112184244, 674273372, 571782680, 8827420195, 46142113101, 85760131222, 287369842623, 120773832179, 83209719751, 1684374218587, 6358345589299, 6305601215112, 5800992744105, 33960226045484, 56924554232879, 11856046381401
Offset: 1

Views

Author

Felix Fröhlich, May 12 2022

Keywords

Crossrefs

Row k = 8 of A257833.
Cf. similar sequences for p^k: A039678 (k=2), A249275 (k=3), A353937 (k=4), A353938 (k=5), A353939 (k=6), A353940 (k=7), A353942 (k=9), A353943 (k=10).

Programs

  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^8)^(p-1)==1, return(b)))
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A353941(n): return 2**8+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**8,True)[1]) # Chai Wah Wu, May 17 2022

Extensions

a(7)-a(8) from Amiram Eldar, May 12 2022
More terms from Jinyuan Wang, May 17 2022

A353942 Smallest b > 1 such that b^(p-1) == 1 (mod p^9) for p = prime(n).

Original entry on oeis.org

513, 19682, 280182, 14906455, 676386984, 822557039, 8185328614, 1835323405, 147534349327, 430099398783, 746688111476, 3054750102760, 9430469115218, 42562034654367, 92084372092298, 28307243117603, 17362132628379, 430275700643181, 478910674129864, 69114209866295
Offset: 1

Views

Author

Felix Fröhlich, May 12 2022

Keywords

Crossrefs

Row k = 9 of A257833.
Cf. similar sequences for p^k: A039678 (k=2), A249275 (k=3), A353937 (k=4), A353938 (k=5), A353939 (k=6), A353940 (k=7), A353941 (k=8), A353943 (k=10).

Programs

  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^9)^(p-1)==1, return(b)))
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A353942(n): return 2**9+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**9,True)[1]) # Chai Wah Wu, May 17 2022

Extensions

a(5)-a(6) from Amiram Eldar, May 12 2022
More terms from Jinyuan Wang, May 17 2022

A353943 Smallest b > 1 such that b^(p-1) == 1 (mod p^10) for p = prime(n).

Original entry on oeis.org

1025, 59048, 3626068, 135967276, 1509748675, 14149342837, 109522148350, 649340249056, 191730243526, 45941644105613, 6359301533362, 24287026146320, 265934493600922, 927939012431924, 1377672497815095, 4440230734662684, 10400007512898615, 12198961352308417
Offset: 1

Views

Author

Felix Fröhlich, May 12 2022

Keywords

Crossrefs

Row k = 10 of A257833.
Cf. similar sequences for p^k: A039678 (k=2), A249275 (k=3), A353937 (k=4), A353938 (k=5), A353939 (k=6), A353940 (k=7), A353941 (k=8), A353942 (k=9).

Programs

  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^10)^(p-1)==1, return(b)))
    
  • Python
    from sympy.ntheory.residue_ntheory import nthroot_mod
    from sympy import prime
    def A353943(n): return 2**10+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**10,True)[1]) # Chai Wah Wu, May 17 2022

Extensions

a(5)-a(6) from Amiram Eldar, May 12 2022
More terms from Jinyuan Wang, May 17 2022

A254444 Largest k such that p = prime(n) satisfies b^(p-1) == 1 (mod p^k) for some base b with 1 < b < p.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 3, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1
Offset: 2

Views

Author

Felix Fröhlich, May 04 2015

Keywords

Comments

a(n) > 1 iff p is in A134307.
Meyer proved in 1902 that for any prime p exactly p - 1 bases b with b < p^k exist such that b^(p-1) == 1 (mod p^k) (cf. Keller, Richstein, 2005, page 930).
a(30) = 3 is the first term with a value > 2, corresponding to prime(30) = 113 (see the comment from 2011 in A134307). This is the first case where A249275(n) < A000040(n).
Do the values of this sequence have an upper bound or, more formally, does this sequence have a supremum?

Examples

			With p = 113: For all bases b with 1 < b < 113, p (trivially) satisfies b^112 == 1 (mod 113^k) for k = 1 and for no k > 1, with the single exception of b = 68, where p satisfies the congruence for k = 3 (and hence for k = 1 and k = 2). Since 3 is the largest value of k for all 1 < b < 113, a(30) = 3.
		

Crossrefs

Cf. A134307.

Programs

  • PARI
    forprime(p=3, 400, k=1; maxk=0; for(b=2, p-1, while(Mod(b, p^k)^(p-1)==1, k++); if(k-1 > maxk, maxk=k-1)); print1(maxk, ", "))

A275338 Smallest prime p where a base b with 1 < b < p exists such that b^(p-1) == 1 (mod p^n).

Original entry on oeis.org

3, 11, 113
Offset: 1

Views

Author

Felix Fröhlich, Jul 28 2016

Keywords

Comments

Smallest prime p such that A254444(i) >= n, where i is the index of p in A000040.
For n > 1, a(n) is a term of A134307.
For n > 1, if A000040(i) is a term of the sequence, then A249275(i) < A000040(i).
For n > 1, smallest prime p such that T(n, i) < p, where i is the index of p in A000040 and T = A257833.
a(4) > 5*10^8 if it exists (see Fischer link).

Examples

			For n = 3: p = 113 satisfies 68^(p-1) == 1 (mod p^3) and there is no smaller prime p such that p satisfies b^(p-1) == 1 (mod p^3) for some b with 1 < b < p, so a(3) = 113.
		

Crossrefs

Programs

  • PARI
    a(n) = forprime(p=1, , for(b=2, p-1, if(Mod(b, p^n)^(p-1)==1, return(p))))
Showing 1-10 of 10 results.