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 A298908 #31 Oct 23 2018 16:11:41 %S A298908 341,91,4,15,6,25,4,9,10,33,4,65,14,15,4,9,6,49,4,21,22,69,4,25,9,9,4, %T A298908 15,6,49,4,33,34,9,4,133,38,15,4,21,6,25,4,9,46,65,4,25,10,39,4,9,6, %U A298908 35,4,25,58,15,4,91,9,9,4,15,6,49,4,15,10,9,4,65,15,15,4,21,6,49,4,9 %N A298908 Smallest composite k such that (n^k - 1)/(n - 1) == 1 (mod k) for n > 1. %C A298908 The smallest repunit pseudoprime to base n. %C A298908 a(n) is the smallest composite k such that n^k == n (mod (n-1)k). %C A298908 a(n) is the smallest composite k such that (n^k - 1)/(n - 1) is a Fermat pseudoprime to base n. %C A298908 a(n) >= A000790(n). %C A298908 a(n) <= A271801(n). %C A298908 a(m!+1) > m. %C A298908 a(4m) = 4. %C A298908 Records: 341, 361, 403, 561, 685, 1247, 1387, 1891, 2353, 2701, 3277, 4681, 5173, 5461, 6001, 6541, 7445, ..., . %C A298908 If n is composite, then a(n) <= n. There are only finitely many primes p such that a(p) > p. It seems that a(n) < n for all sufficiently large n. - _Thomas Ordowski_, Sep 10 2018 %H A298908 Robert G. Wilson v, <a href="/A298908/b298908.txt">Table of n, a(n) for n = 2..10000</a> %t A298908 f[n_] := Block[{k = 4}, While[PrimeQ@k || Mod[(n^k -1)/(n -1), k] != 1, k++]; k]; Array[f, 80, 2] %t A298908 With[{r = Select[Range[4, 400], CompositeQ]}, Table[SelectFirst[r, Mod[(n^# - 1)/(n - 1), #] == 1 &], {n, 2, 81}]] (* _Michael De Vlieger_, Jan 28 2018 *) %Y A298908 Cf. A000790, A271801. %K A298908 nonn %O A298908 2,1 %A A298908 _Thomas Ordowski_ and _Robert G. Wilson v_, Jan 28 2018