A338128 a(n) is the least k > 1 such that the base n representation of k^k ends with that of k.
3, 4, 3, 6, 3, 4, 3, 4, 5, 12, 3, 5, 4, 5, 5, 9, 4, 7, 5, 4, 11, 12, 3, 6, 5, 10, 4, 17, 5, 16, 9, 11, 9, 13, 4, 10, 7, 5, 5, 9, 4, 7, 11, 9, 12, 24, 5, 8, 6, 9, 5, 54, 10, 11, 7, 7, 17, 60, 5, 13, 16, 4, 9, 5, 11, 37, 9, 12, 13, 36, 7, 37, 10, 6, 7, 16, 5, 27
Offset: 2
Examples
a(10) = A082576(2) = 5.
Links
Programs
-
PARI
a(n) = for (k=2, oo, if (Mod(k, n^#digits(k,n))^k==k, return (k)))
Formula
a(n) <= n+1 with equality iff n belongs to A065296.
Comments