|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|