OFFSET
1,1
COMMENTS
All terms k are repdigit numbers minus 20. In addition, k is required to have the same number of digits as k + 18. This excludes 22-20 = 2 and 111-20 = 91. - Andrew Howroyd, Oct 22 2023
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = 13 plus 18 = 31; the rightmost 3 is now in front and 1 at the end;
a(2) = 24 plus 18 = 42; the rightmost 4 is now in front and 2 at the end;
a(3) = 35 plus 18 = 53; the rightmost 5 is now in front and 3 at the end;
a(4) = 46 plus 18 = 64; the rightmost 6 is now in front and 4 at the end;
...
a(8) = 202 plus 18 = 220; the rightmost 2 is now in front and 0 at the end; etc.
MATHEMATICA
Select[Range[10^6], FromDigits[RotateRight[IntegerDigits[#]]]-#==18 &] (* Stefano Spezia, Oct 19 2023 *)
PROG
(PARI) a(n) = if(n > 0, n++; n+=(n>=9); (n%9 + 1)*(10^(n\9 + 2)-1)/9 - 20) \\ Andrew Howroyd, Oct 18 2023
(Python)
def ok(n): s = str(n); return int(s[-1]+s[:-1]) - n == 18
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Oct 19 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini, Oct 18 2023
STATUS
approved