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!)
A189050 a(n) = if n even then P((n-2)/2)+P(n/2) otherwise 3*P((n+1)/2)+P((n-1)/2) where P(i) are the Pell numbers (A000129). 1
3, 1, 7, 3, 17, 7, 41, 17, 99, 41, 239, 99, 577, 239, 1393, 577, 3363, 1393, 8119, 3363, 19601, 8119, 47321, 19601, 114243, 47321, 275807, 114243, 665857, 275807, 1607521, 665857, 3880899, 1607521, 9369319, 3880899, 22619537, 9369319, 54608393, 22619537, 131836323, 54608393, 318281039, 131836323, 768398401, 318281039, 1855077841, 768398401 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
REFERENCES
R. P. Grimaldi, Ternary strings with no consecutive 0's and no consecutive 1's, Congressus Numerantium, 205 (2011), 129-149. See p. 142.
LINKS
FORMULA
a(n) = 2*a(n-2)+a(n-4). G.f.: -x*(3+x+x^2+x^3) / ( -1+2*x^2+x^4 ). - Colin Barker, Jul 24 2013
a(n) = a(n-1)+2*a(n-2) if n odd. a(n) =(a(n-1)-a(n-2))/2 if n even. - R. J. Mathar, Jun 18 2014
MAPLE
A000129 := proc(n) option remember; if n <=1 then n; else 2*A000129(n-1)+A000129(n-2); fi; end; P:=A000129;
pal:=n-> if n mod 2 = 0 then P((n-2)/2)+P(n/2) else 3*P((n+1)/2)+P((n-1)/2); fi;
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, If[EvenQ[n], b+2a, (b-a)/2]}; NestList[nxt, {2, 3, 1}, 50][[All, 2]] (* or *) LinearRecurrence[{0, 2, 0, 1}, {3, 1, 7, 3}, 50] (* Harvey P. Dale, Mar 06 2019 *)
CROSSREFS
Cf. A000129 (Pell numbers), A001333 (bisections)
Sequence in context: A333847 A342268 A316742 * A095868 A140962 A013602
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 16 2011
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 April 20 11:40 EDT 2024. Contains 371838 sequences. (Running on oeis4.)