A034494 a(n) = (7^n+1)/2.
1, 4, 25, 172, 1201, 8404, 58825, 411772, 2882401, 20176804, 141237625, 988663372, 6920643601, 48444505204, 339111536425, 2373780754972, 16616465284801, 116315256993604, 814206798955225, 5699447592686572, 39896133148806001, 279272932041642004
Offset: 0
Examples
From _Adi Dani_, May 28 2011: (Start) a(2)=25: there are 25 compositions of even numbers into 2 parts <=6: (0,0) (0,2),(2,0),(1,1) (0,4),(4,0),(1,3),(3,1),(2,2) (0,6),(6,0),(1,5),(5,1),(2,4),(4,2),(3,3) (2,6),(6,2),(3,5),(5,3),(4,4) (4,6),(6,4),(5,5) (6,6) (End)
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Index entries for linear recurrences with constant coefficients, signature (8,-7).
Programs
-
Magma
[(7^n+1)/2: n in [0..30]]; // Vincenzo Librandi, Jun 16 2011
-
Maple
A034494:=n->(7^n+1)/2: seq(A034494(n), n=0..30); # Wesley Ivan Hurt, Apr 09 2017
-
Mathematica
(7^Range[0, 25] + 1)/2 (* or *) LinearRecurrence[{8, -7}, {1, 4}, 26] (* Paolo Xausa, Aug 14 2025 *)
-
PARI
a(n)=(7^n+1)/2 \\ Charles R Greathouse IV, Jul 02 2013
-
PARI
Vec((1-4*x)/((1-x)*(1-7*x)) + O(x^100)) \\ Altug Alkan, Nov 01 2015
Formula
E.g.f.: exp(4*x)*cosh(3*x). - Paul Barry, Apr 20 2003
a(n) = 7*a(n-1) - 3, a(0) = 1.
G.f.: (1-4*x)/((1-x)*(1-7*x)). - Philippe Deléham, Jul 11 2005
a(n) = 8*a(n-1)-7*a(n-2), a(0)=1, a(1)=4. - Philippe Deléham, Nov 15 2008
a(n) = ((4+sqrt(9))^n+(4-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
Comments