|
|
A237671
|
|
Let m_n denote the number which is obtained from n-base representation of m if its digits are written in nondecreasing order; then a(n) is the smallest period of the sequence which is defined by the recurrence b(0)=0, b(1)=1, b(k)=(b(k-1) + b(k-2))_n, for k>=2, or a(n)=0, if there is no such period.
|
|
4
|
|
|
1, 3, 16, 6, 20, 24, 16, 36, 120, 300, 20, 288, 28, 192, 200, 552, 180, 192, 180, 1380, 224, 60, 1728, 912, 3800, 756, 576, 1776, 4102, 15480, 3540, 1344, 10800, 14328, 800, 2304, 1520, 1890, 1232, 11280, 9040, 31152, 49544, 3660, 6360, 3696, 13248, 21408
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,2
|
|
COMMENTS
|
We conjecture that the sequence b is always eventually periodic, and so a(n)>0.
|
|
LINKS
|
|
|
EXAMPLE
|
For n=5, b-sequence begins 0,1,1,2,3,1,4,1,1,2,... It has period {1,1,2,3,1,4} of length 6. So a(5)=6.
a(10) = 120, because the eventual period of A069638 is 120.
|
|
PROG
|
(Python)
import sympy, functools
def digits2int(x, b):
return functools.reduce(lambda n, d:b*n+d, x, 0)
return next(sympy.cycle_length(lambda x:(x[1], digits2int(sorted(sympy.ntheory.factor_.digits(sum(x), n)[1:]), n)), (0, 1)))[0] # Pontus von Brömssen, Aug 28 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|