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 A371513 #44 May 12 2024 11:15:21 %S A371513 1,2,6,42,30,105,910,561,1365,5005,5565,11305,36465,140505,239785, %T A371513 41041,682465,873145,185185,418285,1683969,2113665,5503785,1242241, %U A371513 6697405,8549905,31932901,11996985,31260405,30534805,47031061,825265,27265161,32306365,55336645,21662641 %N A371513 a(n) is the smallest number m with n divisors d such that d^m mod m = d. %e A371513 a(0) = 1 with divisors {}; %e A371513 a(1) = 2 with divisor {1}; %e A371513 a(2) = 6 with divisors {1, 3}; %e A371513 a(3) = 42 with divisors {1, 7, 21}; %e A371513 a(4) = 30 with divisors {1, 6, 10, 15}; %e A371513 a(5) = 105 with divisors {1, 7, 15, 21, 35}; %e A371513 a(6) = 910 with divisors {1, 35, 65, 91, 130, 455}; %e A371513 a(7) = 561 with divisors {1, 3, 11, 17, 33, 51, 187}; %e A371513 a(8) = 1365 with divisors {1, 13, 21, 91, 105, 195, 273, 455}; %e A371513 a(9) = 5005 with divisors {1, 11, 55, 65, 77, 143, 385, 715, 1001}; %e A371513 a(10) = 5565 with divisors {1, 7, 15, 21, 35, 105, 265, 371, 1113, 1855}; %e A371513 a(11) = 11305 with divisors {1, 17, 19, 35, 85, 119, 323, 595, 665, 1615, 2261}. %t A371513 f[n_] := DivisorSum[n, 1 &, PowerMod[#, n, n] == # &]; seq[max_] := Module[{t = Table[0, {max}], c = 0, n = 1, i}, While[c < max, i = f[n] + 1; If[i <= max && t[[i]] == 0, c++; t[[i]] = n]; n++]; t]; seq[18] (* _Amiram Eldar_, Apr 11 2024 *) %o A371513 (Python) %o A371513 from sympy import divisors %o A371513 from itertools import count, islice %o A371513 def f(n, divs): return sum(1 for d in divs if pow(d, n, n) == d%n) %o A371513 def agen(verbose=False): # generator of terms %o A371513 adict, n = dict(), 0 %o A371513 for k in count(1): %o A371513 divs = divisors(k)[1:] %o A371513 if len(divs) < n: continue %o A371513 v = f(k, divs) %o A371513 if v not in adict: %o A371513 adict[v] = k %o A371513 if verbose: print("FOUND", v, k) %o A371513 while n in adict: yield adict[n]; n += 1 %o A371513 print(list(islice(agen(), 15))) # _Michael S. Branicky_, Apr 10 2024, updated Apr 17 2024 after _Jon E. Schoenfield_ %Y A371513 Cf. A182816, A272538, A279024, A371883, A371884. %K A371513 nonn %O A371513 0,2 %A A371513 _Juri-Stepan Gerasimov_, Apr 10 2024 %E A371513 a(12)-a(25) from _Michael S. Branicky_, Apr 10 2024 %E A371513 a(26)-a(35) from _Jon E. Schoenfield_, Apr 10 2024