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!)
A080039 a(n) = floor((1+sqrt(2))^n). 10
1, 2, 5, 14, 33, 82, 197, 478, 1153, 2786, 6725, 16238, 39201, 94642, 228485, 551614, 1331713, 3215042, 7761797, 18738638, 45239073, 109216786, 263672645, 636562078, 1536796801, 3710155682, 8957108165, 21624372014, 52205852193 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(n) = P(n) - (1+(-1)^n)/2, where P(n) is the Pell sequence (A000129) with initial conditions 2, 2.
For n>0 a(n) is the maximum element in the continued fraction for P(n)*sqrt(2) where P=A000129 - Benoit Cloitre, Jun 19 2005
LINKS
FORMULA
G.f.: g(t) = (1-t^2+2*t^3)/(1-2*t-2*t^2+2*t^3+t^4).
From Hieronymus Fischer, Jan 02 2009: (Start)
The fractional part of (1+sqrt(2))^n equals (1+sqrt(2))^(-n), if n odd. For even n, the fractional part of (1+sqrt(2))^n is equal to 1-(1+sqrt(2))^(-n).
fract((1+sqrt(2))^n)) = (1/2)*(1+(-1)^n)-(-1)^n*(1+sqrt(2))^(-n) = (1/2)*(1+(-1)^n)-(1-sqrt(2))^n.
See A001622 for a general formula concerning the fractional parts of powers of numbers x>1, which satisfy x-x^(-1)=floor(x).
a(n) = (sqrt(2)+1)^n - (1/2) + (-1)^n*((sqrt(2)-1)^n - (1/2)) for n>0. (End)
MATHEMATICA
CoefficientList[Series[(1-t^2+2t^3)/(1-2t-2t^2+2t^3+t^4), {t, 0, 30}], t]
Floor[(1+Sqrt[2])^Range[0, 40]] (* or *) LinearRecurrence[{2, 2, -2, -1}, {1, 2, 5, 14}, 40] (* Harvey P. Dale, Aug 10 2021 *)
PROG
(PARI) t='t+O('t^50); Vec((1-t^2+2t^3)/(1-2t-2t^2+2t^3+t^4)) \\ G. C. Greubel, Jul 05 2017
CROSSREFS
Sequence in context: A096772 A090803 A018015 * A344236 A265226 A357835
KEYWORD
easy,nonn
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Jan 21 2003
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 27 23:22 EDT 2024. Contains 372020 sequences. (Running on oeis4.)