login
A393200
a(n) is the least value of m such that the sum of the digits of n in base m is coprime with n.
1
2, 2, 2, 2, 6, 2, 2, 2, 8, 2, 8, 2, 2, 2, 2, 2, 12, 2, 12, 5, 2, 2, 14, 2, 2, 2, 2, 2, 18, 2, 2, 2, 6, 2, 6, 2, 2, 2, 12, 2, 24, 2, 2, 2, 4, 2, 26, 2, 2, 2, 2, 2, 30, 3, 2, 2, 4, 2, 8, 2, 2, 6, 2, 2, 36, 2, 8, 3, 2, 2, 14, 2, 2, 2, 2, 2, 42, 2, 8, 3, 2, 2, 44, 2, 4, 2, 2, 2
OFFSET
2,1
COMMENTS
It is well-defined, the expression of every n >= 2 in base n is 10, and the sum of its digits, 1+0=1, is always coprime with n.
LINKS
MATHEMATICA
Table[First@Select[Range[2, n], CoprimeQ[n, Total[IntegerDigits[n, #], 1]] &], {n, 2, 100}]
PROG
(PARI) a(n) = my(m=2); while (gcd(sumdigits(n, m), n) != 1, m++); m; \\ Michel Marcus, Feb 07 2026
CROSSREFS
Sequence in context: A324291 A114005 A103794 * A273258 A073124 A278260
KEYWORD
nonn,base
AUTHOR
STATUS
approved