cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A080039 a(n) = floor((1+sqrt(2))^n).

This page as a plain text file.
%I A080039 #26 Aug 23 2024 22:53:37
%S A080039 1,2,5,14,33,82,197,478,1153,2786,6725,16238,39201,94642,228485,
%T A080039 551614,1331713,3215042,7761797,18738638,45239073,109216786,263672645,
%U A080039 636562078,1536796801,3710155682,8957108165,21624372014,52205852193
%N A080039 a(n) = floor((1+sqrt(2))^n).
%C A080039 a(n) = P(n) - (1+(-1)^n)/2, where P(n) is the Pell sequence (A000129) with initial conditions 2, 2.
%C A080039 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
%H A080039 G. C. Greubel, <a href="/A080039/b080039.txt">Table of n, a(n) for n = 0..1000</a>
%H A080039 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-2,-1).
%F A080039 G.f.: (1-t^2+2*t^3)/(1-2*t-2*t^2+2*t^3+t^4).
%F A080039 From _Hieronymus Fischer_, Jan 02 2009: (Start)
%F A080039 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).
%F A080039 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.
%F A080039 See A001622 for a general formula concerning the fractional parts of powers of numbers x>1, which satisfy x-x^(-1)=floor(x).
%F A080039 a(n) = (sqrt(2)+1)^n - (1/2) + (-1)^n*((sqrt(2)-1)^n - (1/2)) for n>0. (End)
%t A080039 CoefficientList[Series[(1-t^2+2t^3)/(1-2t-2t^2+2t^3+t^4), {t, 0, 30}], t]
%t A080039 Floor[(1+Sqrt[2])^Range[0,40]] (* or *) LinearRecurrence[{2,2,-2,-1},{1,2,5,14},40] (* _Harvey P. Dale_, Aug 10 2021 *)
%o A080039 (PARI) t='t+O('t^50); Vec((1-t^2+2*t^3)/(1-2*t-2*t^2+2*t^3+t^4)) \\ _G. C. Greubel_, Jul 05 2017
%Y A080039 Cf. A001622, A006497, A014176, A098316.
%K A080039 easy,nonn
%O A080039 0,2
%A A080039 Mario Catalani (mario.catalani(AT)unito.it), Jan 21 2003