A215885 a(n) = 3*a(n-1) - a(n-3), with a(0) = 3, a(1) = 3, and a(2) = 9.
3, 3, 9, 24, 69, 198, 570, 1641, 4725, 13605, 39174, 112797, 324786, 935184, 2692755, 7753479, 22325253, 64283004, 185095533, 532961346, 1534601034, 4418707569, 12723161361, 36634883049, 105485941578, 303734663373, 874569107070, 2518221379632, 7250929475523
Offset: 0
Examples
For n=3, we have a(3) = 3^3 - 3 = 24 ternary cyclic compositions of n=3 (with fixed positions on the circle for the parts) that avoid 110 because we have to exclude 110, 101, and 011. - _Petros Hadjicostas_, Sep 13 2017
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..1999
- A. E. Edlin and D. Zeilberger, The Goulden-Jackson cluster method for cyclic words, Adv. Appl. Math. 25 (2000), 228-232.
- A. E. Edlin and D. Zeilberger, Maple program; Local copy
- Kai Wang, Fibonacci Numbers And Trigonometric Functions Outline, (2019).
- Roman Witula, Ramanujan Type Trigonometric Formulae, Demonstratio Math. 45 (2012), 779-796.
- Index entries for linear recurrences with constant coefficients, signature (3,0,-1).
Programs
-
Mathematica
LinearRecurrence[{3,0,-1}, {3,3,9}, 50]
-
PARI
my(x='x+O('x^30)); Vec(3*(1-2*x)/(1-3*x+x^3)) \\ Altug Alkan, Sep 13 2017
Formula
a(n) = 3*A147704(n).
a(n) = c(1)^(-n) + c(2)^(-n) + c(4)^(-n) = (-c(1)*c(2))^n + (-c(1)*c(4))^n + (-c(2)*c(4))^n, where c(j) := 2*cos(2*Pi*j/9).
G.f.: Sum_{n>=0} a(n)*x^n = 3-3*x*(x^2-1)/(1-3*x+x^3) = 3*(1-2*x)/(1-3*x+x^3).
G.f. of Edlin and Zeilberger (2000): 1+Sum_{n>=1} a(n)*x^n = 1-3*x*(x^2-1)/(1-3*x+x^3) = (1-2*x^3)/(1-3*x+x^3). - Petros Hadjicostas, Sep 13 2017
a(n) = ceiling(r^n) for n >= 1, where r = 1/A130880 is the largest root of x^3 - 3*x^2 + 1. - Tamas Lengyel, Feb 20 2022
Comments