login
a(n) = 2*a(n-1) + 6*a(n-2), a(0) = 0, a(1) = 1.
32

%I #72 Dec 16 2023 15:53:10

%S 0,1,2,10,32,124,440,1624,5888,21520,78368,285856,1041920,3798976,

%T 13849472,50492800,184082432,671121664,2446737920,8920205824,

%U 32520839168,118562913280,432250861568,1575879202816,5745263575040

%N a(n) = 2*a(n-1) + 6*a(n-2), a(0) = 0, a(1) = 1.

%C a(n+1) = a(n) + A083098(n+1). A083098(n+1)/a(n) converges to sqrt(7).

%C The same sequence may be obtained by the following process. Starting a priori with the fraction 1/1, the denominators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 7 times the bottom to get the new top. The limit of the sequence of fractions is sqrt(7). - _Cino Hilliard_, Sep 25 2005

%C Pisano period lengths: 1, 1, 2, 1, 12, 2, 7, 1, 6, 12, 60, 2,168, 7, 12, 1,288, 6, 18, 12, ... - _R. J. Mathar_, Aug 10 2012

%C a(n) is divisible by 2^ceiling(n/2), see formula below. - _Ralf Stephan_, Dec 24 2013

%C Connect the center of a regular hexagon with side length 1 with its six vertices. a(n) is the number of paths of length n from the center to any of its vertices. Number of paths of length n from the center to itself is 6*a(n-1). - _Jianing Song_, Apr 20 2019

%D John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.

%H Vincenzo Librandi, <a href="/A083099/b083099.txt">Table of n, a(n) for n = 0..1000</a>

%H Project Euler, <a href="https://projecteuler.net/problem=752">Problem 752</a>, sequence beta(n).

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,6).

%F G.f.: x/(1 - 2*x - 6*x^2).

%F From _Paul Barry_, Sep 29 2004: (Start)

%F E.g.f.: (d/dx)(exp(x)*sinh(sqrt(7)*x)/sqrt(7));

%F a(n-1) = Sum_{k=0..n} binomial(n, 2k+1)*7^k. (End)

%F Simplified formula: a(n) = ((1 + sqrt(7))^n - (1 - sqrt(7))^n)/sqrt(28). - Al Hakanson (hawkuu(AT)gmail.com), Jan 05 2009

%F G.f.: G(0)*x/(2*(1-x)), where G(k) = 1 + 1/(1 - x*(7*k-1)/(x*(7*k+6) - 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 26 2013

%F a(2n) = 2^n * A154245(n), a(2n+1) = 2^n * (5*A154245(n) - 9*A154245(n-1)). - _Ralf Stephan_, Dec 24 2013

%F a(n) = Sum_{k=1,3,5,...<=n} binomial(n,k)*7^((k-1)/2). - _Vladimir Shevelev_, Feb 06 2014

%F a(n) = i^(n-1)*6^((n-1)/2)*ChebyshevU(n-1, -i/sqrt(6)). - _G. C. Greubel_, Jun 01 2023

%p A083099 := proc(n)

%p option remember;

%p if n <= 1 then

%p n;

%p else

%p 2*procname(n-1)+6*procname(n-2) ;

%p end if;

%p end proc: # _R. J. Mathar_, Sep 23 2016

%t CoefficientList[Series[x/(1-2x-6x^2), {x, 0, 25}], x] (* Adapted for offset 0 by _Vincenzo Librandi_, Feb 07 2014 *)

%t Expand[Table[((1 + Sqrt[7])^n - (1 - Sqrt[7])^n)7/(14Sqrt[7]), {n, 0, 25}]] (* _Zerinvary Lajos_, Mar 22 2007 *)

%t LinearRecurrence[{2,6}, {0,1}, 25] (* _Sture Sjöstedt_, Dec 06 2011 *)

%o (Sage) [lucas_number1(n,2,-6) for n in range(0, 25)] # _Zerinvary Lajos_, Apr 22 2009

%o (PARI) a(n)=([0,1; 6,2]^n*[0;1])[1,1] \\ _Charles R Greathouse IV_, May 10 2016

%o (PARI) my(x='x+O('x^30)); concat([0], Vec(x/(1-2*x-6*x^2))) \\ _G. C. Greubel_, Jan 24 2018

%o (Magma) [n le 2 select n-1 else 2*Self(n-1) + 6*Self(n-2): n in [1..30]]; // _G. C. Greubel_, Jan 24 2018

%o (SageMath)

%o A083099=BinaryRecurrenceSequence(2,6,0,1)

%o [A083099(n) for n in range(41)] # _G. C. Greubel_, Jun 01 2023

%Y The following sequences (and others) belong to the same family: A000129, A001333, A002532, A002533, A002605, A015518, A015519, A026150, A046717, A063727, A083098, A083099, A083100, A084057.

%Y Cf. A154245, A291008.

%K nonn,easy

%O 0,3

%A Mario Catalani (mario.catalani(AT)unito.it), Apr 22 2003