cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A016029 a(1) = a(2) = 1, a(2n + 1) = 2*a(2n) and a(2n) = 2*a(2n - 1) + (-1)^n.

This page as a plain text file.
%I A016029 #32 Dec 30 2023 23:42:48
%S A016029 1,1,2,5,10,19,38,77,154,307,614,1229,2458,4915,9830,19661,39322,
%T A016029 78643,157286,314573,629146,1258291,2516582,5033165,10066330,20132659,
%U A016029 40265318,80530637,161061274,322122547,644245094
%N A016029 a(1) = a(2) = 1, a(2n + 1) = 2*a(2n) and a(2n) = 2*a(2n - 1) + (-1)^n.
%C A016029 Row sums of Riordan array ((1+x^3)/(1-x^4), x/(1-x)). - _Paul Barry_, Oct 08 2007
%H A016029 G. C. Greubel, <a href="/A016029/b016029.txt">Table of n, a(n) for n = 1..1000</a>
%H A016029 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,2).
%F A016029 From _Ralf Stephan_, Jan 12 2005: (Start)
%F A016029 a(n) = (1/10)*(3*2^n + 3*(-1)^floor(n/2) - (-1)^floor((n+1)/2)).
%F A016029 G.f.: x*(1-x+x^2)/((1-2*x)*(1+x^2)). (End)
%F A016029 a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3). - _Paul Curtz_, Dec 18 2007
%F A016029 From _G. C. Greubel_, Jul 08 2022: (Start)
%F A016029 a(n) = round( 3*2^(n-1)/5 ).
%F A016029 E.g.f.: (1/10)*(3*exp(2*x) + 4*sin(x) + 2*cos(x) - 5). (End)
%t A016029 LinearRecurrence[{2,-1,2}, {1,1,2}, 31] (* _Ray Chandler_, Sep 23 2015 *)
%o A016029 (Magma) [Round(3*2^(n-1)/5): n in [1..41]]; // _G. C. Greubel_, Jul 08 2022
%o A016029 (SageMath) [(1/10)*(3*2^n + 2*i^n*(((n+1)%2) - 2*i*(n%2))) for n in (1..40)] # _G. C. Greubel_, Jul 08 2022
%K A016029 nonn
%O A016029 1,3
%A A016029 _Robert G. Wilson v_