[go: up one dir, main page]

login
A327664
a(n) is the least base >= 2 such that for any k in the range 0..n-1, the sum of digits of k and the sum of digits of n differ for at least one base b in the range 2..a(n).
2
2, 2, 3, 2, 4, 3, 3, 2, 3, 5, 4, 4, 5, 5, 3, 2, 4, 3, 5, 5, 3, 4, 4, 3, 4, 3, 3, 3, 3, 4, 3, 2, 6, 4, 4, 4, 6, 6, 6, 5, 5, 5, 4, 4, 5, 5, 3, 3, 6, 5, 6, 4, 4, 3, 5, 6, 5, 6, 6, 6, 4, 4, 3, 2, 5, 6, 5, 5, 3, 4, 5, 5, 6, 6, 5, 6, 6, 6, 3, 3, 3, 3, 5, 5, 4, 4, 4
OFFSET
0,1
LINKS
FORMULA
a(n) = 2 iff n belongs to A000225.
a(n) <= A327667(n).
EXAMPLE
For n = 9:
- the sum of digits of 9 is distinct to that of 0, 1, 2, 4, 7, 8 in base 2,
- the sum of digits of 9 equals that of 5 and 6 in base 2, but is distinct in base 3,
- the sum of digits of 9 equals that of 3 in bases 2, 3 and 4, but is distinct in base 5,
- hence a(9) = 5.
PROG
(PARI) a(n) = { my (v=2); for (k=1, n-1, for (p=2, oo, if (sumdigits(n, p)!=sumdigits(k, p), v=max(v, p); break))); return (v) }
CROSSREFS
Sequence in context: A263323 A263297 A163870 * A155043 A337327 A065770
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Sep 21 2019
STATUS
approved