login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100720 Expansion of g.f.: (3+x+2*x^2-2*x^3)/((1-2*x)*(1+x^2)). 1

%I #18 Nov 18 2022 03:41:49

%S 3,7,13,23,47,97,193,383,767,1537,3073,6143,12287,24577,49153,98303,

%T 196607,393217,786433,1572863,3145727,6291457,12582913,25165823,

%U 50331647,100663297,201326593,402653183,805306367,1610612737,3221225473,6442450943,12884901887

%N Expansion of g.f.: (3+x+2*x^2-2*x^3)/((1-2*x)*(1+x^2)).

%H G. C. Greubel, <a href="/A100720/b100720.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(0)=3 and for n>1: a(n)= 3*2^n+1 if n(mod 4)=1 or 2; otherwise 3*2^n-1. - R. Piyo (nagoya314(AT)yahoo.com), Dec 12 2004

%F From _G. C. Greubel_, Nov 16 2022: (Start)

%F a(n) = [n=0] + 3*2^n - (-1)^floor((n+1)/2).

%F E.g.f.: 1 + 3*exp(2*x) - cos(x) + sin(x). (End)

%t LinearRecurrence[{2,-1,2}, {3,7,13,23}, 41] (* _G. C. Greubel_, Nov 16 2022 *)

%o (Magma) [3] cat [3*2^n - (-1)^Floor((n+1)/2): n in [1..40]]; // _G. C. Greubel_, Nov 16 2022

%o (SageMath)

%o def A100720(n): return int(n==0) + 3*2^n - (-1)^((n+1)//2)

%o [A100720(n) for n in range(40)] # _G. C. Greubel_, Nov 16 2022

%K nonn,easy

%O 0,1

%A _Creighton Dement_, Dec 06 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:55 EDT 2024. Contains 371241 sequences. (Running on oeis4.)