|
|
A362830
|
|
Number of bases b with 2 <= b < n such that n written in base b is a strictly increasing sequence of digits.
|
|
1
|
|
|
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 5, 4, 6, 6, 7, 7, 9, 8, 11, 10, 11, 12, 14, 12, 15, 15, 17, 16, 19, 17, 20, 19, 21, 22, 23, 21, 25, 26, 27, 25, 29, 27, 30, 30, 30, 32, 34, 31, 35, 34, 37, 37, 40, 37, 40, 39, 41, 43, 45, 40, 46, 46, 46, 46, 49, 48, 52, 51, 54, 51
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
LINKS
|
|
|
EXAMPLE
|
The number 27 forms a strictly increasing sequence of digits when written in base 4 (1,2,3), base 7 (3,6), base 10 (2,7), base 11 (2,5), base 12 (2,3), and bases 14 through 25 (1,13 through 1,2), and no other bases below 27. There are 17 bases with this property, so a(27)=17.
|
|
MATHEMATICA
|
a[n_] := Count[Range[2, n], _?(Less @@ IntegerDigits[n, #] &)]; Array[a, 100] (* Amiram Eldar, Aug 02 2023 *)
|
|
PROG
|
(Python)
from sympy.ntheory import digits
def c(v): return all(v[i+1] > v[i] for i in range(len(v)-1))
def a(n): return sum(1 for b in range(2, n) if c(digits(n, b)[1:]))
(PARI) a(n) = sum(b=2, n-1, my(d=digits(n, b)); d==Set(d)); \\ Michel Marcus, May 07 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|