login
A272614
Numbers whose binary digits, except for the first "1", are given by floor(((k-n)/n) mod 2) with 1<=k<=n.
1
1, 2, 6, 8, 28, 40, 104, 144, 496, 672, 1632, 2240, 7872, 11648, 27520, 33536, 120576, 175616, 445952, 629760, 2014208, 2701312, 6453248, 8712192, 33353728, 48881664, 114548736, 144949248, 476561408, 684687360, 1787789312, 2501836800, 8510177280, 11647451136, 27590000640
OFFSET
0,2
COMMENTS
Numbers such that the sequence of its binary digits change periodically with linearly increasing period depending of its position: after the first '1', k-th most significant bit changes with period 2*(k-1). For instance, the second most significant bit changes with period 2, third bit changes with period 4, fourth bit with period 6, and so on. For example on the first 15 terms we have:
a(n) Binary digits
1 1
2 1 0
6 1 1 0
8 1 0 0 0
28 1 1 1 0 0
40 1 0 1 0 0 0
104 1 1 0 1 0 0 0
144 1 0 0 1 0 0 0 0
496 1 1 1 1 1 0 0 0 0
672 1 0 1 0 1 0 0 0 0 0
1632 1 1 0 0 1 1 0 0 0 0 0
2240 1 0 0 0 1 1 0 0 0 0 0 0
7872 1 1 1 1 0 1 1 0 0 0 0 0 0
11648 1 0 1 1 0 1 1 0 0 0 0 0 0 0
27520 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0
/ | | | | | \ etc.
MSB / | | | | Period 12
/ | | | \
Period 2 / | | Period 10
/ | \
Period 4 | Period 8
/
Period 6
Regarding the periodicity of the binary digits, this sequence is similar to A059893 where the periodicity of its binary digits are powers of two.
By truncating the least significant bits in such a way to leave only k most significant bits of a(n) with n>k-1, it is obtained a periodic sequence with period p given by p=Least common multiple (LCM) of {2,4,6,..,2k}. In general any subsequence obtained by a selection of a subset of its most significant bits including the most significant bit is periodic.
FORMULA
a(n) = 2^n + Sum_{k=1..n}[floor(((n-k)/k) mod 2) * 2^(n-k)].
MATHEMATICA
nmax = 34;
a[n_] := 2^n + Sum[ Floor@Mod[(n - k)/k, 2]* 2^(n - k), {k, 1, n}];
Table[a[n] , {n, 0, nmax}]
PROG
(PARI) a(n) = 2^n + sum(k=1, n, (floor(((n-k)/k)) % 2) * 2^(n-k)); \\ Michel Marcus, May 20 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Andres Cicuttin, May 03 2016
STATUS
approved