OFFSET
1,2
COMMENTS
The alternating, non-overlapping bits means that the divisors sum to 1 less than a power of 2.
They also resemble a zipper:
10101010
01010101.
LINKS
Index entries for linear recurrences with constant coefficients, signature (5,0,-20,16).
FORMULA
From Colin Barker, Aug 24 2020: (Start)
G.f.: 2*x^2 / ((1 - x)*(1 - 2*x)*(1 + 2*x)*(1 - 4*x)).
a(n) = 5*a(n-1) - 20*a(n-3) + 16*a(n-4) for n>4.
(End)
18*a(n) = 4^(n+1) +(-2)^n +4 -9*2^n. - R. J. Mathar, Sep 09 2020
EXAMPLE
For n = 6, in binary form:
101010
x 010101
----------
1101110010 (882)
MATHEMATICA
LinearRecurrence[{5, 0, -20, 16}, {0, 2, 10, 50}, 27] (* Amiram Eldar, Aug 24 2020 *)
PROG
(Python)
def a(n):
x = y = ''
for _ in range(n):
x, y = y + '1', x + '0'
return int(x, 2) * int(y, 2)
(PARI) a(n) = (2 * 2^n \ 3) * (2 * 2^(n-1) \ 3) \\ David A. Corneth, Aug 24 2020
(PARI) concat(0, Vec(2*x^2 / ((1 - x)*(1 - 2*x)*(1 + 2*x)*(1 - 4*x)) + O(x^30))) \\ Colin Barker, Sep 04 2020
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Matt Donahoe, Aug 24 2020
STATUS
approved