OFFSET
1,2
COMMENTS
For n >= 2, a(n) - a(n-1) = A160824(n).
It is easy to see that: If a(n) = 2^m - 2^k with k>0, then a(n+1) = 2^m - 2^(k-1); in all other cases 2^k|a(n) implies 2^k|a(n+1). From this one concludes that a(n) = 11*2^k implies a(n+1) = 13*2^k and a(n) = 13*2^k implies a(n+1) = 11*2^(k+1). - Hagen von Eitzen, Jun 01 2009
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,2).
FORMULA
a(2*n) = 13*2^(n-2) and a(2*n+1) = 11*2^(n-1) if n >= 2. - Hagen von Eitzen, Jun 01 2009
From Colin Barker, Dec 29 2016: (Start)
a(n) = 2*a(n-2) for n>5.
G.f.: x*(1 + 6*x + 5*x^2 + x^3 + 8*x^4) / (1 - 2*x^2).
(End)
MATHEMATICA
Join[{1, 6, 7}, LinearRecurrence[{0, 2}, {13, 22}, 38]] (* Jean-François Alcover, Sep 22 2017 *)
PROG
(PARI) zeros(n) = if(n<2, 0, zeros(floor(n/2))+1-(n%2))
n=1; L=1; while(n<=100, print1(L, ", "); step = bitand(L, -L); if(step>1 && bitand(L+step, L+step-1)==0, step/=2); ofs=step; while(zeros(ofs)!=zeros(L+ofs), ofs += step); n+=1; L+=ofs; ) \\ Hagen von Eitzen, Jun 01 2009
(PARI) Vec(x*(1 + 6*x + 5*x^2 + x^3 + 8*x^4) / (1 - 2*x^2) + O(x^50)) \\ Colin Barker, Dec 29 2016
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Leroy Quet, May 27 2009
EXTENSIONS
More terms from Hagen von Eitzen, Jun 01 2009
STATUS
approved