A015909 a(n) = smallest k >= 1 such that n divides k^n + k.
1, 1, 3, 3, 5, 2, 7, 7, 9, 4, 11, 3, 13, 6, 3, 15, 17, 8, 19, 4, 21, 10, 23, 8, 25, 12, 27, 3, 29, 5, 31, 31, 33, 16, 7, 8, 37, 18, 18, 15, 41, 6, 43, 11, 45, 22, 47, 15, 49, 24, 21, 4, 53, 26, 22, 7, 57, 28, 59, 15, 61, 30, 63, 63, 65, 2, 67, 16, 69, 5, 71, 8, 73, 36, 18, 8, 77, 12, 79, 15, 81, 40, 83, 20, 15, 42, 12, 32, 89, 9, 7, 23, 93, 46, 38, 32, 97, 48, 99, 24
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A015908.
Programs
-
Mathematica
sk[n_]:=Module[{k=1},While[PowerMod[k,n,n]!=n-k,k++];k]; Array[sk,100] (* Harvey P. Dale, Jun 29 2023 *)
Extensions
Definition, offset, and data corrected. Thanks to Harvey P. Dale for pointing out that something was wrong. - N. J. A. Sloane, Jun 29 2023