|
|
A005246
|
|
a(n) = (1 + a(n-1)*a(n-2))/a(n-3), a(0) = a(1) = a(2) = 1.
(Formerly M0829)
|
|
32
|
|
|
1, 1, 1, 2, 3, 7, 11, 26, 41, 97, 153, 362, 571, 1351, 2131, 5042, 7953, 18817, 29681, 70226, 110771, 262087, 413403, 978122, 1542841, 3650401, 5757961, 13623482, 21489003, 50843527, 80198051, 189750626, 299303201, 708158977, 1117014753
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
For n >= 4 we have the linear recurrence a(n) = 4*a(n-2) - a(n-4). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 04 2001
Integer solutions to the equation floor(sqrt(3)*x^2) = x*floor(sqrt(3)*x). - Benoit Cloitre, Mar 18 2004
For n > 2, a(n) is the smallest integer > a(n-1) such that sqrt(3)*a(n) is closer to and greater than an integer than sqrt(3)*a(n-1). I.e., a(n) is the smallest integer > a(n-1) such that frac(sqrt(3)*a(n)) < frac(sqrt(3)*a(n-1)). - Benoit Cloitre, Jan 20 2003
The lower principal and intermediate convergents to 3^(1/2), beginning with 1/1, 3/2, 5/3, 12/7, 19/11, form a strictly increasing sequence; essentially, numerators=A143643 and denominators=A005246. - Clark Kimberling, Aug 27 2008
This sequence is a particular case of the following situation: a(0)=1, a(1)=a, a(2)=b with the recurrence relation a(n+3)=(a(n+2)*a(n+1)+q)/a(n) where q is given in Z to have Q=(a*b^2+q*b+a+q)/(a*b) itself in Z. The g.f. is f: f(z)=(1+a*z+(b-Q)*z^2+(a*b+q-a*Q)*z^3)/(1-Q*z^2+z^4); so we have the linear recurrence: a(n+4)=Q*a(n+2)-a(n). The general form of a(n) is given by: a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (b-Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p) and a(2*m+1) = a*Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (a*b+q-a*Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p). - Richard Choulet, Feb 24 2010
In the closed-form formula,
sqrt(2+sqrt(3))^n = ((sqrt(6)+sqrt(2))/2)^n;
-sqrt(2+sqrt(3))^n = ((-sqrt(6)-sqrt(2))/2)^n;
sqrt(2-sqrt(3))^n = ((sqrt(6)-sqrt(2))/2)^n;
-sqrt(2-sqrt(3))^n = ((sqrt(2)-sqrt(6))/2)^n.
(End)
a(n) for n > 1 are the integer square roots of (floor(m^2/3)+1), where the values of m are given by A143643. Also see A082630. - Richard R. Forberg, Nov 14 2013
The a(n) = (1 + a(n-1)*a(n-2))/a(n-3) recursion has the Laurent property. If a(0), a(1), a(2) are variables, then a(n) is a Laurent polynomial (a rational function with a monomial denominator). - Michael Somos, Feb 27 2019
|
|
REFERENCES
|
Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1 + x - 3*x^2 - 2*x^3)/(1 - 4*x^2 + x^4).
Limit_{n->oo} a(2n+1)/a(2n) = (3+sqrt(3))/3 = 1.5773502...; lim_{n->oo} a(2n)/a(2n-1) = (3+sqrt(3))/2 = 2.3660254.... - Benoit Cloitre, Aug 07 2002
For n > 2: a(n) = a(n-1) + Sum_{k=1..floor((n-1)/2)} a(2*k). - Reinhard Zumkeller, Dec 16 2007
a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 3*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p).
a(2*m+1) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 2*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p). (End)
Closed form without extra leading 1: ((sqrt(6)+3)*(sqrt(2+sqrt(3))^n+(sqrt(2-sqrt(3))^n))+(3-sqrt(6))*(-sqrt(2+sqrt(3))^n+(-sqrt(2-sqrt(3))^n)))/12.
Closed form with extra leading 1: ((6+3*sqrt(6)-2*sqrt(3)-3*sqrt(2))*(sqrt(2+sqrt(3))^n)+(6+3*sqrt(6)+2*sqrt(3)+3*sqrt(2))*(sqrt(2-sqrt(3))^n)+(6-3*sqrt(6)-2*sqrt(3)+3*sqrt(2))*(-sqrt(2+sqrt(3))^n)+(6-3*sqrt(6)+2*sqrt(3)-3*sqrt(2))*(-sqrt(2-sqrt(3))^n))/24. (End)
a(2*n+2) = Sum_{k = 0..n} 2^k*binomial(n+k,2*k); a(2*n+1) = Sum_{k = 0..n} n/(n+k)*2^k*binomial(n+k,2*k) for n >= 1. Row sums of A211956. - Peter Bala, May 01 2012
a(n) = ((sqrt(2)+sqrt(3)+(-1)^n*(sqrt(2)-sqrt(3)))*sqrt(2+(2-sqrt(3))^n*(2+ sqrt(3))-(-2+sqrt(3))*(2+ sqrt(3))^n))/(4*sqrt(3)). - Gerry Martens, Jun 06 2015
0 = a(n) - 2*a(n+1) + a(n+2) if n is even, 0 = a(n) - 3*a(n+1) + a(n+2) if n is odd for all n in Z. - Michael Somos, Feb 10 2017
|
|
EXAMPLE
|
G.f. = 1 + x + x^2 + 2*x^3 + 3*x^4 + 7*x^5 + 11*x^6 + 26*x^7 + 41*x^8 + ...
a(4) = 4^2 - 4^0 - 3*4^1 = 3.
a(7) = 4^3 - 4*binomial(2,1) - 2*(4^2-1) = 26. (End)
|
|
MAPLE
|
A005246:=-(-1-z+2*z**2+z**3)/(1-4*z**2+z**4); # Conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for one of the leading 1's.
for q from 1 to 10 do :a:=1:b:=1:Q:=(a*b^2+q*b+a+q)/(a*b): for m from 0 to 15 do U(m):=sum((-1)^p*binomial(m-p, p)*Q^(m-2*p), p=0..floor(m/2))+(b-Q)*sum((-1)^p*binomial(m-1-p, p)*Q^(m-1-2*p), p=0..floor((m-1)/2)):od: for m from 0 to 15 do V(m):=a*sum((-1)^p*binomial(m-p, p)*Q^(m-2*p), p=0..floor(m/2))+(a*b+q-a*Q)*sum((-1)^p*binomial(m-1-p, p)*Q^(m-1-2*p), p=0..floor((m-1)/2)):od:for m from 0 to 15 do W(2*m):=U(m):od:for m from 0 to 14 do W(2*m+1):=V(m):od:seq(W(m), m=0..30):od; # Richard Choulet, Feb 24 2010
|
|
MATHEMATICA
|
RecurrenceTable[{a[0]==a[1]==a[2]==1, a[n]==(1+a[n-1]a[n-2])/a[n-3]}, a, {n, 40}] (* Harvey P. Dale, May 28 2013 *)
a[n_] := Cosh[(n-1)*ArcSinh[1/Sqrt[2]]]*If[EvenQ[n], Sqrt[2/3], 1]; Table[a[n] // FunctionExpand, {n, 0, 34}] (* Jean-François Alcover, Dec 10 2014, after Peter Bala *)
a[ n_] := With[{m = If[ n < 0, 2 - n, n]}, SeriesCoefficient[ (1 + x - 3 x^2 - 2 x^3) / (1 - 4 x^2 + x^4), {x, 0, m}]]; (* Michael Somos, Feb 10 2017 *)
|
|
PROG
|
(PARI) {a(n) = if( n<0, n = 2 - n); polcoeff((1 + x - 3*x^2 - 2*x^3) / (1 - 4*x^2 + x^4) + x * O(x^n), n)}; /* Michael Somos, Nov 15 2006 */
(PARI) {a(n) = real( (2 + quadgen(12))^(n\2) * if( n%2, 1, 1 - 1 / quadgen(12)) )}; /* Michael Somos, May 24 2012 */
(Haskell)
a005246 n = a005246_list !! n
a005246_list = 1 : 1 : 1 : map (+ 1) (zipWith div
(zipWith (*) (drop 2 a005246_list) (tail a005246_list)) a005246_list)
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|