OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,0,0,100,-100).
FORMULA
a(n) = A004185(2*a(n-1)+1).
For k >= 1;
a(12*k-9) = 100^(k-1) * 16 - 1;
a(12*k-8) = 100^(k-1) * 14 - 1;
a(12*k-7) = 100^(k-1) * 28 - 1;
a(12*k-6) = 100^(k-1) * 56 - 1;
a(12*k-5) = 100^(k-1) * 112 - 1;
a(12*k-4) = 100^(k-1) * 224 - 1;
a(12*k-3) = 100^(k-1) * 448 - 1;
a(12*k-2) = 100^(k-1) * 590 - 1;
a(12*k-1) = 100^(k-1) * 1180 - 1;
a(12*k) = 100^(k-1) * 2360 - 1;
a(12*k+1) = 100^(k-1) * 1480 - 1;
a(12*k+2) = 100^(k-1) * 2600 - 1.
G.f.: -(1800*x^15 -720*x^14 +1080*x^13 -1080*x^12 -590*x^11 -142*x^10 -224*x^9 -112*x^8 -56*x^7 -28*x^6 -14*x^5 +2*x^4 -8*x^3 -4*x^2 -2*x -1) / ((x-1)*(10*x^6-1)*(10*x^6+1)). - Alois P. Heinz, Aug 02 2021
a(n) = 100*a(n-12) + 99 for n >= 15. - Pontus von Brömssen, Sep 01 2021
MATHEMATICA
a[0] = 1; a[n_] := a[n] = FromDigits @ Sort @ IntegerDigits[2*a[n - 1] + 1]; Array[a, 45, 0] (* Amiram Eldar, Jul 13 2021 *)
NestList[FromDigits[Sort[IntegerDigits[2#+1]]]&, 1, 40] (* Harvey P. Dale, Oct 01 2023 *)
PROG
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = fromdigits(vecsort(digits(2*va[n-1]+1))); ); va; } \\ Michel Marcus, Aug 31 2021
(Python)
from itertools import accumulate
def atis(anm1, _): return int("".join(sorted(str(2*anm1+1))))
print(list(accumulate([1]*39, atis))) # Michael S. Branicky, Aug 31 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Ctibor O. Zizka, Jul 13 2021
STATUS
approved