login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = (2^(2+n)-(-1)^n)/3 - 2*n.
1

%I #18 Sep 08 2022 08:45:35

%S 1,1,1,5,13,33,73,157,325,665,1345,2709,5437,10897,21817,43661,87349,

%T 174729,349489,699013,1398061,2796161,5592361,11184765,22369573,

%U 44739193,89478433,178956917,357913885,715827825,1431655705,2863311469,5726622997,11453246057,22906492177

%N a(n) = (2^(2+n)-(-1)^n)/3 - 2*n.

%H Vincenzo Librandi, <a href="/A141025/b141025.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-3,2).

%F a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4).

%F a(n) = A001045(n+2) - 2*n.

%F a(n+1) - a(n) = 4*A000975(n-1).

%F a(n+1) - 2*a(n)= 2*(n-1) + (-1)^n = -1, -1, 3, 3, 7, 7, 11, 11,... duplicated A004767.

%F G.f. ( -1+2*x+x^2-6*x^3 ) / ( (1+x)*(2*x-1)*(x-1)^2 ). - _R. J. Mathar_, Jul 07 2011

%t CoefficientList[Series[(-1 + 2*x + x^2 - 6*x^3)/((1 + x)*(2*x - 1)*(x - 1)^2), {x, 0, 50}], x] (* _G. C. Greubel_, Oct 11 2017 *)

%o (Magma) [(2^(2+n)-(-1)^n)/3-2*n: n in [0..40]]; // _Vincenzo Librandi_, Aug 08 2011

%o (PARI) for(n=0,50, print1((2^(2+n)-(-1)^n)/3 - 2*n, ", ")) \\ _G. C. Greubel_, Oct 11 2017

%K nonn,easy

%O 0,4

%A _Paul Curtz_, Jul 29 2008

%E Definition replaced by closed form by _R. J. Mathar_, Jul 07 2011