|
|
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.
|
|
5
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
First differs from A004086 at n = 101, since A004086(101) = 101, but a(101) = 11.
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 123: When 123 is rotated one place to the left the resulting number is 231, so a(123) = 231.
|
|
MATHEMATICA
|
|
|
PROG
|
(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)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|