login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A326653
Nested base shift convergence sequence (NBSC): gives the constant term of the convergence of a number n into a base sequence conversion nest: a(n) = ...FromDigits(IntegerDigits(FromDigits(IntegerDigits(n,2),3),4),5)..., until the result does not change for more iterations.
0
1, 3, 5, 17, 21, 29, 33, 201, 213, 239, 251, 453, 479, 497, 533, 7157, 7169, 8013, 8069, 8351, 8381, 8561, 8681, 13469, 13589, 15401, 15837, 16337, 16353, 16619, 16773, 339221, 340199, 340917, 341021, 343433, 343581, 474827, 867107, 952799, 953781, 1621007, 1621137, 1687451, 1688819, 1690737, 1691373
OFFSET
1,2
COMMENTS
Making this nest for any number n: ...FromDigits(IntegerDigits(FromDigits(IntegerDigits(n,2),3),4),5)..., each step of the nest is an iteration of type: ...FromDigits(IntegerDigits(n,s),s+1)..., with the initial s with the value 2, that is, for example, in the first iteration, the number n is converted to base 2, so it is brought to base 10 as if it came from base 3. The next iteration repeats this operation, but converts the result of previous step to base 4 and takes it to base 10 from base 5, and so on until the number does not change when a new step is made.
FORMULA
a(n) = ...FromDigits(IntegerDigits(FromDigits(IntegerDigits(n,2),3),4),5)..., until the number no longer varies in the next iteration.
EXAMPLE
The number 1 is the first term because, since the first iteration, when n=1, the result is 1, and 1 on any basis is itself, so a(1)=1.
The number 3 is a term because when n=2, the first iteration represented by: FromDigits(IntegerDigits(2,2),3) gives 3 and the second iteration: FromDigits(IntegerDigits(3,4),5), it still gives 3, that is, in any subsequent iteration, the result for n=2 continues to give 3, so a(2)=3.
The number 5 is a term because when n=3, after the second and subsequent iterations the result is 5, then a(3)=5 and so on.
MATHEMATICA
(* Terms of NBSC (a(n)): *)
NBSC[n_]:=Module[{i}, FixedPoint[i=1; FromDigits[IntegerDigits[#, 1+i++], 1+i++]&, n, Infinity]]
(* Sequence generation (sequence NBSC): *)
NBSCtable[n_]:=Module[{i}, Table[FixedPoint[i=1; FromDigits[IntegerDigits[#, 1+i++], 1+i++]&, x, Infinity], {x, 1, n}]]
(* Number of iterations of each term: *)
NBSCiter[n_]:=Module[{s, i}, s=1; While[True, If[Nest[i=1; FromDigits[IntegerDigits[#, 1+i++], 1+i++]&, n, s]==FixedPoint[i=1; FromDigits[IntegerDigits[#, 1+i++], 1+i++]&, n, Infinity], Break[]]; s++]; s]
(* Graph each step of the first NBSC (nested graphic): *)
NBSCstepgraph[n_]:=Module[{i, j}, label[l_]:=Panel[l, FrameMargins->-2, Background->Lighter[Red, 0.5]]; NBSC[m_]:=FixedPoint[j=1; FromDigits[IntegerDigits[#, 1+j++], 1+j++]&, m, Infinity]; NestGraph[i=1; FromDigits[IntegerDigits[#, 1+i++], 1+i++]&, n, 300, VertexLabels->{"Name", NBSC[n]->Placed["Name", Above, label]}]]
PROG
(PARI) a(n) = {my(ok = 0, b = 2, m); while (!ok, m = fromdigits(digits(n, b), b+1); if (m == n, break); n = m; b += 2; ); n; } \\ Michel Marcus, Sep 13 2019
CROSSREFS
Sequence in context: A295387 A263258 A347885 * A218624 A152078 A152079
KEYWORD
nonn,base
AUTHOR
STATUS
approved