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

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
Showing 1-7 of 7 results.