A255683 Sum of the binary numbers whose digits are cyclic permutations of the binary expansion of n.
1, 3, 6, 7, 14, 14, 21, 15, 30, 30, 45, 30, 45, 45, 60, 31, 62, 62, 93, 62, 93, 93, 124, 62, 93, 93, 124, 93, 124, 124, 155, 63, 126, 126, 189, 126, 189, 189, 252, 126, 189, 189, 252, 189, 252, 252, 315, 126, 189, 189, 252, 189, 252, 252, 315, 189, 252, 252, 315
Offset: 1
Examples
6 in base 2 is 110 and all the cyclic permutations of its digits are: 110, 101, 011. In base 10 they are 6, 5, 3 and their sum is 6 + 5 + 3 = 14. From _Peter Bala_, Mar 02 2015: (Start) Let b(n) = A063787(n), beginning [1, 2, 2, 3, 2, 3, 3, 4, ...]. Then [a(1)] = 1*[b(1)]; [a(2), a(3)] = 3*[b(1), b(2)]; [a(4), a(5), a(6), a(7)] = 7*[b(1), b(2), b(3), b(4)]; [a(8), a(9), a(10), a(11), a(12), a(13), a(14), a(15)] = 15*[b(1), b(2), b(3), b(4), b(5), b(6), b(7), b(8)]. It is conjectured that this relationship continues. (End)
Links
- Paolo P. Lava, Table of n, a(n) for n = 1..1000
Programs
-
Maple
with(numtheory): P:=proc(q) local a,b,c,k,n; for n from 1 to q do a:=convert(n,binary,decimal); b:=n; c:=ilog10(a); for k from 1 to c do a:=(a mod 10)*10^c+trunc(a/10); b:=b+convert(a,decimal,binary); od; print(b); od; end: P(1000);
-
Mathematica
f[n_] := Block[{b = 2, w = IntegerDigits[n, b]}, Apply[Plus, FromDigits[#, b] & /@ (RotateRight[w, #] & /@ Range[Length@ w])]]; Array[f, 60] (* Michael De Vlieger, Mar 04 2015 *) Table[Total[FromDigits[#,2]&/@Table[RotateRight[IntegerDigits[k,2],n],{n,IntegerLength[k,2]}]],{k,60}] (* Harvey P. Dale, Jan 03 2018 *)
Formula
a(2^n) = Sum_{k=1..n} 2^k = 2^(n+1)-1.
a(5+4*k) = a(6+4*k), for k >= 0.
For n >= 0 and 0 <= i <= 2^n - 1 we conjecture a(2^n + i) = (2^(n+1) - 1)*A063787(i+1). An example is given below. - Peter Bala, Mar 02 2015
Comments