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!)
A102345 a(n) = 3^n + (-1)^n. 6
2, 2, 10, 26, 82, 242, 730, 2186, 6562, 19682, 59050, 177146, 531442, 1594322, 4782970, 14348906, 43046722, 129140162, 387420490, 1162261466, 3486784402, 10460353202, 31381059610, 94143178826, 282429536482, 847288609442 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(n) = A105723(n) + 2*(-1)^n; (a(n) + A105723(n))/2 = A000244(n). - Reinhard Zumkeller, Apr 18 2005
LINKS
FORMULA
a(n) = 2*a(n-1) + 3*a(n-2).
From Elmo R. Oliveira, Dec 18 2023: (Start)
G.f.: 2*(1-x)/((1+x)*(1-3*x)).
E.g.f.: exp(-x) + exp(3*x).
a(n) = 2*A046717(n). (End)
MATHEMATICA
Table[3^n+(-1)^n, {n, 0, 30}] (* or *) LinearRecurrence[{2, 3}, {2, 2}, 30] (* Harvey P. Dale, Jun 19 2016 *)
PROG
(Sage) [lucas_number2(n, 2, -3) for n in range(0, 26)] # Zerinvary Lajos, Apr 30 2009
CROSSREFS
Apart from leading term, same as A084182.
Sequence in context: A341680 A213338 A309753 * A151364 A200949 A001885
KEYWORD
easy,nonn
AUTHOR
Graeme McRae, Feb 16 2005
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 May 17 05:33 EDT 2024. Contains 372579 sequences. (Running on oeis4.)