A272614 Numbers whose binary digits, except for the first "1", are given by floor(((k-n)/n) mod 2) with 1<=k<=n.
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
Programs
-
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}]
-
PARI
a(n) = 2^n + sum(k=1, n, (floor(((n-k)/k)) % 2) * 2^(n-k)); \\ Michel Marcus, May 20 2016
Formula
a(n) = 2^n + Sum_{k=1..n}[floor(((n-k)/k) mod 2) * 2^(n-k)].
Comments