The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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
3, 7, 13, 23, 47, 97, 193, 383, 767, 1537, 3073, 6143, 12287, 24577, 49153, 98303, 196607, 393217, 786433, 1572863, 3145727, 6291457, 12582913, 25165823, 50331647, 100663297, 201326593, 402653183, 805306367, 1610612737, 3221225473, 6442450943, 12884901887 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
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
From G. C. Greubel, Nov 16 2022: (Start)
a(n) = [n=0] + 3*2^n - (-1)^floor((n+1)/2).
E.g.f.: 1 + 3*exp(2*x) - cos(x) + sin(x). (End)
MATHEMATICA
LinearRecurrence[{2, -1, 2}, {3, 7, 13, 23}, 41] (* G. C. Greubel, Nov 16 2022 *)
PROG
(Magma) [3] cat [3*2^n - (-1)^Floor((n+1)/2): n in [1..40]]; // G. C. Greubel, Nov 16 2022
(SageMath)
def A100720(n): return int(n==0) + 3*2^n - (-1)^((n+1)//2)
[A100720(n) for n in range(40)] # G. C. Greubel, Nov 16 2022
CROSSREFS
Sequence in context: A048465 A049112 A349793 * A297852 A297953 A084898
KEYWORD
nonn,easy
AUTHOR
Creighton Dement, Dec 06 2004
STATUS
approved

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 June 10 03:52 EDT 2024. Contains 373253 sequences. (Running on oeis4.)