OFFSET
1,1
COMMENTS
This sequence consists of all numbers of the form 2^k - 2, 2^k - 1, where k >= 2.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-2).
FORMULA
From Alois P. Heinz, Dec 27 2023: (Start)
G.f.: -x*(2*x^3-3*x-2)/((x-1)*(x+1)*(2*x^2-1)).
a(n) = 2^floor((n+3)/2)-1-(n mod 2). (End)
EXAMPLE
The sequence corresponding to 14 is 7, 3, 1, all of whose terms are odd. So 14 is a term of the sequence.
MATHEMATICA
atsoQ[n_]:=AllTrue[Rest[NestWhileList[Floor[#/2]&, n, #>1&]], OddQ]; Select[Range[2, 42*10^5], atsoQ] (* Harvey P. Dale, Dec 27 2023 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph L. Pe, Jan 21 2002
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Jun 11 2002
STATUS
approved