login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A255691
Convert n to base 6, move the most significant digit to the least significant one and convert back to base 10.
4
0, 1, 2, 3, 4, 5, 1, 7, 13, 19, 25, 31, 2, 8, 14, 20, 26, 32, 3, 9, 15, 21, 27, 33, 4, 10, 16, 22, 28, 34, 5, 11, 17, 23, 29, 35, 1, 7, 13, 19, 25, 31, 37, 43, 49, 55, 61, 67, 73, 79, 85, 91, 97, 103, 109, 115, 121, 127, 133, 139, 145, 151, 157, 163, 169, 175
OFFSET
0,3
COMMENTS
a(6*n) = 1.
Fixed points of the transform are listed in A048331.
LINKS
EXAMPLE
16 in base 6 is 24: moving the most significant digit as the least significant one we have 42 that is 26 in base 10.
MAPLE
with(numtheory): P:=proc(q, h) local a, b, k, n; print(0);
for n from 1 to q do
a:=convert(n, base, h); b:=[]; for k from 1 to nops(a)-1 do b:=[op(b), a[k]]; od; a:=[a[nops(a)], op(b)];
a:=convert(a, base, h, 10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
print(b); od; end: P(10^4, 6);
MATHEMATICA
roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Append[Rest@ w, First@ w]]; b = 6; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 65]) (* Michael De Vlieger, Mar 04 2015 *)
Table[FromDigits[RotateLeft[IntegerDigits[n, 6]], 6], {n, 0, 70}] (* Harvey P. Dale, Mar 02 2023 *)
KEYWORD
nonn,easy,base
AUTHOR
Paolo P. Lava, Mar 02 2015
STATUS
approved