A345110 a(n) is n rotated one place to the left or, equivalently, n with the most significant digit moved to the least significant place, omitting leading zeros.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 2, 12, 22, 32, 42, 52, 62, 72, 82, 92, 3, 13, 23, 33, 43, 53, 63, 73, 83, 93, 4, 14, 24, 34, 44, 54, 64, 74, 84, 94, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 6, 16, 26, 36, 46, 56, 66, 76, 86
Offset: 0
Examples
For n = 123: When 123 is rotated one place to the left the resulting number is 231, so a(123) = 231.
Crossrefs
Programs
-
Mathematica
Array[FromDigits@*RotateLeft@*IntegerDigits,100,0] (* Giorgos Kalogeropoulos, Jun 09 2021 *)
-
PARI
eva(n) = subst(Pol(n), x, 10) rot(vec) = if(#vec < 2, return(vec)); my(s=concat(Str(2), ".."), v=[]); s=concat(s, Str(#vec)); v=vecextract(vec, s); v=concat(v, vec[1]); v a(n) = eva(rot(digits(n)))
-
Python
def rotl(s): return s[1:] + s[0] def a(n): return int(rotl(str(n))) print([a(n) for n in range(69)]) # Michael S. Branicky, Jun 09 2021
Comments