OFFSET
1,1
COMMENTS
All terms k are repdigit numbers minus 10. The sequence starts with 22 - 10 = 12. - Andrew Howroyd, Oct 22 2023
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = 12 plus 9 = 21; the rightmost 2 is now in front and 1 at the end;
a(2) = 23 plus 9 = 32; the rightmost 3 is now in front and 2 at the end;
a(3) = 34 plus 9 = 43; the rightmost 4 is now in front and 3 at the end;
a(4) = 45 plus 9 = 54; the rightmost 5 is now in front and 4 at the end;
...
a(9) = 101 plus 9 = 110; the rightmost 1 is now in front and 0 at the end; etc.
MATHEMATICA
Select[Range[10^6], FromDigits[RotateRight[IntegerDigits[#]]]-#==9 &] (* Stefano Spezia, Oct 18 2023 *)
PROG
(Python)
def ok(n): s = str(n); return int(s[-1]+s[:-1]) - n == 9
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Oct 18 2023
(PARI) a(n) = if(n > 0, (n%9 + 1)*(10^(n\9 + 2)-1)/9 - 10) \\ Andrew Howroyd, Oct 22 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini, Oct 18 2023
STATUS
approved