A005246 a(n) = (1 + a(n-1)*a(n-2))/a(n-3), a(0) = a(1) = a(2) = 1.
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
Offset: 0
Examples
G.f. = 1 + x + x^2 + 2*x^3 + 3*x^4 + 7*x^5 + 11*x^6 + 26*x^7 + 41*x^8 + ... From _Richard Choulet_, Feb 24 2010: (Start) a(4) = 4^2 - 4^0 - 3*4^1 = 3. a(7) = 4^3 - 4*binomial(2,1) - 2*(4^2-1) = 26. (End)
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
- T. D. Noe, Table of n, a(n) for n = 0..500
- Reid Barton, A combinatorial interpretation of the sequence 1, 1, 2, 6, 21, 77, ...
- Reid Barton, A combinatorial interpretation of the sequence 1, 1, 2, 6, 21, 77, ..., [Annotated scanned copy]
- Peter Cameron's Blog, The ADE affair, 3, Posted 23/06/2011.
- T. Crilly, Double sequences of positive integers, Math. Gaz., 69 (1985), 263-271.
- Enrica Duchi, Andrea Frosini, Renzo Pinzani and Simone Rinaldi, A Note on Rational Succession Rules, J. Integer Seqs., Vol. 6, 2003.
- R. K. Guy, Letter to N. J. A. Sloane, Feb 1986
- Clark Kimberling, Best lower and upper approximates to irrational numbers, Elemente der Mathematik, 52 (1997) 122-126.
- Valentin Ovsienko, Serge Tabachnikov, Dual numbers, weighted quivers, and extended Somos and Gale-Robinson sequences, arXiv:1705.01623 [math.CO], 2017. See p. 10.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- Index entries for linear recurrences with constant coefficients, signature (0,4,0,-1).
Programs
-
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) -- Reinhard Zumkeller, Mar 07 2012
-
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 *)
-
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 */
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
A101265(n) = a(n)*a(n+1). - Franklin T. Adams-Watters, Apr 24 2006
a(n) = a(2-n) for all n in Z. - Michael Somos, Nov 15 2006
a(2*n + 1) = A001075(n). a(2*n) = A001835(n). a(2*n + 1) - a(2*n) = a(2*n + 2) - a(2*n + 1) = A001353(n). - Michael Somos, May 24 2012
For n > 2: a(n) = a(n-1) + Sum_{k=1..floor((n-1)/2)} a(2*k). - Reinhard Zumkeller, Dec 16 2007
From Richard Choulet, Feb 24 2010: (Start)
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)
From Tim Monahan, Jul 01 2011: (Start)
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
Extensions
More terms from Michael Somos, Aug 01 2001
Comments