The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #15 Jun 10 2021 20:55:00

%S 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,

%T 72,82,92,3,13,23,33,43,53,63,73,83,93,4,14,24,34,44,54,64,74,84,94,5,

%U 15,25,35,45,55,65,75,85,95,6,16,26,36,46,56,66,76,86

%N 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.

%C First differs from A004086 at n = 101, since A004086(101) = 101, but a(101) = 11.

%e For n = 123: When 123 is rotated one place to the left the resulting number is 231, so a(123) = 231.

%t Array[FromDigits@*RotateLeft@*IntegerDigits,100,0] (* _Giorgos Kalogeropoulos_, Jun 09 2021 *)

%o (PARI) eva(n) = subst(Pol(n), x, 10)

%o 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

%o a(n) = eva(rot(digits(n)))

%o (Python)

%o def rotl(s): return s[1:] + s[0]

%o def a(n): return int(rotl(str(n)))

%o print([a(n) for n in range(69)]) # _Michael S. Branicky_, Jun 09 2021

%Y Cf. A004086, A345111, A345112, A345113, A345114, A345115.

%Y Rotate left in other bases: A006257, A048787, A255689, A255691, A255692, A255693.

%K nonn,base,easy

%O 0,3

%A _Felix Fröhlich_, Jun 09 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 19:35 EDT 2024. Contains 372738 sequences. (Running on oeis4.)