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.
%I A257833 #48 May 18 2022 09:37:59 %S A257833 5,8,9,7,26,17,18,57,80,33,3,18,182,242,65,19,124,1047,1068,728,129, %T A257833 38,239,1963,1353,1068,2186,257,28,158,239,27216,34967,32318,6560,513, %U A257833 28,333,4260,109193,284995,82681,110443,19682,1025,14,42,2819,15541,861642,758546,2387947,280182,59048,2049 %N 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. %H A257833 Chai Wah Wu, <a href="/A257833/b257833.txt">Table of n, a(n) for n = 2..10000</a> %e A257833 T(3, 5) = 124, since prime(5) = 11 and the smallest b such that b^10 == 1 (mod 11^3) is 124. %e A257833 Table starts %e A257833 k\n| 1 2 3 4 5 6 7 %e A257833 ---+---------------------------------------------------------- %e A257833 2 | 5 8 7 18 3 19 38 ... %e A257833 3 | 9 26 57 18 124 239 158 ... %e A257833 4 | 17 80 182 1047 1963 239 4260 ... %e A257833 5 | 33 242 1068 1353 27216 109193 15541 ... %e A257833 6 | 65 728 1068 34967 284995 861642 390112 ... %e A257833 7 | 129 2186 32318 82681 758546 6826318 21444846 ... %e A257833 8 | 257 6560 110443 2387947 9236508 6826318 112184244 ... %e A257833 9 | 513 19682 280182 14906455 .... %e A257833 10 | 1025 59048 3626068 .... %e A257833 ... %o A257833 (PARI) for(k=2, 10, forprime(p=2, 25, b=2; while(Mod(b, p^k)^(p-1)!=1, b++); print1(b, ", ")); print("")) %o A257833 (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 %o A257833 (Python) %o A257833 from itertools import count, islice %o A257833 from sympy import prime %o A257833 from sympy.ntheory.residue_ntheory import nthroot_mod %o A257833 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]) %o A257833 def A257833_gen(): # generator of terms %o A257833 yield from (A257833_T(n,i-n+2) for i in count(1) for n in range(i,0,-1)) %o A257833 A257833_list = list(islice(A257833_gen(),50)) # _Chai Wah Wu_, May 17 2022 %Y A257833 Column 1 of table is A000051. %Y A257833 Column 2 of table is A024023 (with offset 2). %Y A257833 Column 3 of table is A034939 (with offset 2). %Y A257833 Rows k=2-10 give: A039678, A249275, A353937, A353938, A353939, A353940, A353941, A353942, A353943. %K A257833 nonn,tabl %O A257833 2,1 %A A257833 _Felix Fröhlich_, May 10 2015