|
|
A167231
|
|
Append three digits, each increasing by one modulo 10 from the last digit of the nonnegative integers. 0 -> 123, 1 -> 1234 2 -> 2345, ... , 9 -> 9012, 10 -> 10123, etc.
|
|
0
|
|
|
123, 1234, 2345, 3456, 4567, 5678, 6789, 7890, 8901, 9012, 10123, 11234, 12345, 13456, 14567, 15678, 16789, 17890, 18901, 19012, 20123, 21234, 22345, 23456, 24567, 25678, 26789, 27890, 28901, 29012, 30123, 31234, 32345, 33456, 34567, 35678, 36789, 37890, 38901
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,1,-1).
|
|
FORMULA
|
a(n) = 1000n + O(1).
G.f.: (988*x^10 +111*x^9 +1011*x^8 +1101*x^7 +1111*x^6 +1111*x^5 +1111*x^4 +1111*x^3 +1111*x^2 +1111*x +123) / (x^11 -x^10 -x +1). - Alois P. Heinz, Jul 05 2022
|
|
MAPLE
|
a:= n-> (d-> parse(cat(n, irem(d+i, 10)$i=1..3)))(irem(n, 10)):
|
|
PROG
|
(Python)
def a(n): return int(str(n) + "".join(str((n%10+1+i)%10) for i in range(3)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|