cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 16 results. Next

A121364 Convolution of A066983 with the double Fibonacci sequence A103609.

Original entry on oeis.org

0, 0, 1, 2, 3, 6, 10, 18, 29, 50, 81, 136, 220, 364, 589, 966, 1563, 2550, 4126, 6710, 10857, 17622, 28513, 46224, 74792, 121160, 196041, 317434, 513619, 831430, 1345282, 2177322, 3522981, 5701290, 9224881, 14927768, 24153636, 39083988, 63239221, 102327390
Offset: 1

Views

Author

Graeme McRae, Jul 23 2006

Keywords

Comments

The convolution of 1,0,1,1,1,3,3,7,9,17,25,... (A066983 with 1,0 added to the front) with "A double Fibonacci sequence" (A103609) is the Fibonacci sequence (A000045), with an extra initial 0.

Examples

			a(7)=10 because F(7)=13 and D(8)=3 and a(7)=F(7)-D(8).
		

Crossrefs

Programs

  • Magma
    A121364:= func< n | Fibonacci(n) - Fibonacci(Floor((n+1)/2)) >;
    [A121364(n): n in [1..70]]; // G. C. Greubel, Oct 23 2024
    
  • Mathematica
    LinearRecurrence[{1,2,-1,0,-1,-1},{0, 0, 1, 2, 3, 6},40] (* James C. McMahon, Oct 17 2024 *)
  • PARI
    concat([0,0], Vec(-x^3*(x^2-x-1)/((x^2+x-1)*(x^4+x^2-1)) + O(x^100))) \\ Colin Barker, Oct 13 2014
    
  • SageMath
    def A121364(n): return fibonacci(n) - fibonacci((n+1)//2)
    [A121364(n) for n in range(1,71)] # G. C. Greubel, Oct 23 2024

Formula

a(n) = F(n) - D(n+1), where F is the Fibonacci sequence (A000045) and D is "A double Fibonacci sequence" (A103609).
G.f.: x^3*(1+x-x^2) / ((1-x-x^2)*(1-x^2-x^4)). - Colin Barker, Oct 13 2014

Extensions

More terms from Colin Barker, Oct 13 2014

A153864 Triangle read by rows, A000012 * A153860 * (A066983 * 0^(n-k)).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 2, 6, 3, 1, 2, 2, 6, 6, 7, 2, 2, 2, 6, 6, 14, 9, 1, 2, 2, 6, 6, 14, 18, 17, 2, 2, 2, 6, 6, 14, 18, 34, 25, 1, 2, 2, 6, 6, 14, 18, 34, 50, 43, 2, 2, 2, 6, 6, 14, 18, 34, 50, 86, 67
Offset: 0

Views

Author

Gary W. Adamson, Jan 03 2009

Keywords

Comments

Row sums = A066629: (1, 2, 5, 8, 15, 24, 41, 66, 109,...).
Right border = A066983: (1, 1, 1, 3, 3, 7, 9, 17,...).

Examples

			First few rows of the triangle =
1;
1, 1;
2, 2, 1;
1, 2, 2, 3;
2, 2, 2, 6, 3;
1, 2, 2, 6, 6, 7;
2, 2, 2, 6, 6, 14, 9;
1, 2, 2, 6, 6, 14, 18, 17;
2, 2, 2, 6, 6, 14, 18, 34, 25;
1, 2, 2, 6, 6, 14, 18, 34, 50, 43;
...
		

Crossrefs

Formula

Triangle read by rows, A000012 * A153860 * (A066983 * 0^(n-k))
Given triangle A000012 * A153860 = partial sums of A153860 starting from the top.
(A066983 * 0^n-k) = an infinite lower triangular matrix with A066983 as the
main diagonal: (1, 1, 1, 3, 3, 7, 9, 17, 25,...) and the rest zeros.

A111091 Successive generations of a Kolakoski(3,1) rule starting with 1 (see A066983).

Original entry on oeis.org

1, 3, 111, 313, 1113111, 313111313, 11131113131113111, 3131113131113111313111313, 1113111313111311131311131311131113131113111
Offset: 1

Views

Author

Benoit Cloitre, Oct 12 2005

Keywords

Comments

Terms are palindromic. If b_3(n) denotes the number of 3's in a(n) then b(n) satisfies the recursion: b_3(1)=0, b_3(2)=1 and b_3(n) = b_3(n-1) + b_3(n-2) + (-1)^n so that b_3(2n)=A055588(n) and b_3(2n+1)=A027941(n). If b_1(n) denotes the number of 1's: b_1(1)=1, b_1(2)=0 and b_1(n) = b_1(n-1) + b_1(n-2) - 2*(-1)^n so that b_1(2n)=A004146(n) and b_1(2n+1) = A000032(n-2) - 2.

Examples

			1 --> 3 --> 111 --> 313 --> 1113111 --> 313111313
		

Crossrefs

Cf. A111081.

Formula

As n grows, a(2n-1) converges toward A095345 (read as a word) and a(2n) converges toward A095346.

A052952 a(n) = Fibonacci(n+2) - (1-(-1)^n)/2.

Original entry on oeis.org

1, 1, 3, 4, 8, 12, 21, 33, 55, 88, 144, 232, 377, 609, 987, 1596, 2584, 4180, 6765, 10945, 17711, 28656, 46368, 75024, 121393, 196417, 317811, 514228, 832040, 1346268, 2178309, 3524577, 5702887, 9227464, 14930352, 24157816, 39088169, 63245985, 102334155
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Equals row sums of triangle A173284. - Gary W. Adamson, Feb 14 2010
The Kn21 sums (see A180662 for definition) of the 'Races with Ties' triangle A035317 produce this sequence. - Johannes W. Meijer, Jul 20 2011
a(n-1), for n >= 1, gives the number of compositions of n with relative prime parts, and parts not exceeding 2. See the row sums of triangle A030528 where for even n the leading 1 is missing. - Wolfdieter Lang, Jul 27 2023

Examples

			G.f. = 1 + x + 3*x^2 + 4*x^3 + 8*x^4 + 12*x^5 + 21*x^6 + 33*x^7 + ...
		

Crossrefs

Partial sums of A008346, first differences of A129696.
Cf. also A000032, A000045, A030528.

Programs

  • GAP
    List([0..40], n-> Fibonacci(n+2) -(1-(-1)^n)/2); # G. C. Greubel, Jul 10 2019
  • Haskell
    a052952 n = a052952_list !! n
    a052952_list = 1 : 1 : zipWith (+)
       a059841_list (zipWith (+) a052952_list $ tail a052952_list)
    -- Reinhard Zumkeller, Jan 06 2012
    
  • Magma
    [Fibonacci(n+2)-(1-(-1)^n)/2: n in [0..40]]; // Vincenzo Librandi, Dec 02 2016
    
  • Maple
    A052952 :=proc(n)
        option remember;
        local t1;
        if n <= 1 then
            return 1 ;
        fi:
        if n mod 2 = 1 then
            t1:=0
        else
            t1:=1;
        fi:
        procname(n-1)+procname(n-2)+t1;
    end proc;
    seq(A052952(n), n=0..40) ; # N. J. A. Sloane, May 25 2008
  • Mathematica
    Table[Fibonacci[n+2] -(1-(-1)^n)/2, {n, 0, 40}] (* Vincenzo Librandi, Dec 02 2016 *)
    Sum[(-1)^k*Fibonacci[Range[2,41], 1-k], {k,0,1}] (* G. C. Greubel, Oct 21 2019 *)
    CoefficientList[Series[1/((1-x-x^2)*(1-x^2)),{x,0,40}],x] (* Harvey P. Dale, Sep 12 2020 *)
  • PARI
    {a(n) = fibonacci(n+2) - n%2};
    
  • Sage
    [fibonacci(n+2) -(1-(-1)^n)/2 for n in (0..40)] # G. C. Greubel, Jul 10 2019
    

Formula

G.f.: 1/((1-x-x^2)*(1-x^2)).
a(n) = A074331(n+1).
a(n) = A054450(n+1, 1) (second column of triangle).
a(n) = 2*a(n-2) + a(n-3) + 1, with a(0)=1, a(1)=1, a(2)=3.
a(n) = Sum_{alpha=RootOf(-1+z+z^2)} (3+alpha)*alpha^(-1-n)/3 - Sum_{beta=RootOf(-1+z^2)} beta^(-1-n)/2.
a(2*k) = Sum_{j=0..k} F(2*j+1) = F(2*(k+1)) for k >= 0; a(2*k-1) = Sum_{j=0..k} F(2*j) = F(2*k+1)-1 for k >= 1 (F = A000045, Fibonacci numbers).
a(n) = a(n-1) + a(n-2) + (1+(-1)^n)/2.
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k+1, k). - Paul Barry, Oct 23 2004
a(n) = floor(phi^(n+2) / sqrt(5)), where phi is the golden ratio: phi = (1+sqrt(5))/2. - Reinhard Zumkeller, Apr 19 2005
a(n) = Fibonacci(n+1) + a(n-2) with n>1, a(0)=a(1)=1. - Zerinvary Lajos, Mar 17 2008
a(n) = floor(Fibonacci(n+3)^2/Fibonacci(n+4)). - Gary Detlefs, Nov 29 2010
a(n) = (A001595(n+3) - A066983(n+4))/2. - Gary Detlefs, Dec 19 2010
a(4*n) = F(4*n+2); a(4*n+1) = F(4*n+3) - 1; a(4*n+2) = F(4*n+4); a(4*n+3) = F(4*n+5) - 1. - Johannes W. Meijer, Jul 20 2011
a(n+1) = a(n) + a(n-1) + A059841(n+1). - Reinhard Zumkeller, Jan 06 2012
a(n) = floor(|F((1+i)*(n+2))|), n >= 0, with the complex Fibonacci function F: C -> C, z -> F(z) with F(z) := (exp(log(phi)*z) - exp(i*Pi*z)*exp(-log(phi)*z))/(2*phi-1) with the modulus |z|, the imaginary unit i and the golden section phi:=(1+sqrt(5))/2. A Conjecture: For F(z) see, e.g., the T. Koshy reference. ch. 45, p. 523, where F is called f, given in A000045. - Wolfdieter Lang, Jul 24 2012
5*a(n) = (L(n+3)-1)*(L(n+4)+3) -14 -Sum_{k=0..n} L(k+1)*L(k+5) = (L(n+3)-1)*(L(n+4)+3) -L(2*n+7) +A168309(n), where L=A000032. - J. M. Bergot, Jun 13 2014
a(n) = floor(phi*Fibonacci(n+1)), where phi is the golden section. - Michel Dekking, Dec 02 2016
a(n) = -(-1)^n * a(-4-n) for all n in Z. - Michael Somos, Dec 03 2016
a(n) = Sum_{k=0..n} Sum_{i=0..n} C(n-k-1,k-i). - Wesley Ivan Hurt, Sep 21 2017
a(n) = floor(1/(Sum_{k>=n+4} 1/Fibonacci(k))) [Ohtsuka and Nakamura]. - Michel Marcus, Aug 09 2018
a(n) = floor(abs(chebyshevU(n/2, 3/2))). - Federico Provvedi, Feb 23 2022
E.g.f.: exp(x/2)*(5*cosh(sqrt(5)*x/2) + 3*sqrt(5)*sinh(sqrt(5)*x/2))/5 - sinh(x). - Stefano Spezia, Mar 09 2024

Extensions

Additional formulas and more terms from Wolfdieter Lang, May 02 2000
Better description from Olivier Gérard, Jun 05 2001

A008346 a(n) = Fibonacci(n) + (-1)^n.

Original entry on oeis.org

1, 0, 2, 1, 4, 4, 9, 12, 22, 33, 56, 88, 145, 232, 378, 609, 988, 1596, 2585, 4180, 6766, 10945, 17712, 28656, 46369, 75024, 121394, 196417, 317812, 514228, 832041, 1346268, 2178310, 3524577, 5702888, 9227464, 14930353, 24157816, 39088170, 63245985, 102334156
Offset: 0

Views

Author

Keywords

Comments

Diagonal sums of A059260. - Paul Barry, Oct 25 2004
The absolute value of the Euler characteristic of the Boolean complex of the Coxeter group A_n. - Bridget Tenner, Jun 04 2008
a(n) is the number of compositions (ordered partitions) of n into two sorts of 2's and one sort of 3's. Example: the a(5)=4 compositions of 5 are 2+3, 2'+3, 3+2 and 3+2'. - Bob Selcoe, Jun 21 2013
Let r = 0.70980344286129... denote the rabbit constant A014565. The sequence 2^a(n) gives the simple continued fraction expansion of the constant r/2 = 0.35490172143064565732 ... = 1/(2^1 + 1/(2^0 + 1/(2^2 + 1/(2^1 + 1/(2^4 + 1/(2^4 + 1/(2^9 + 1/(2^12 + ... )))))))). Cf. A099925. - Peter Bala, Nov 06 2013
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [0, 1, 1; 1, 0, 1; 1, 0, 0] or of the 3 X 3 matrix [0, 1, 1; 1, 0, 0; 1, 1, 0]. - R. J. Mathar, Feb 03 2014
a(n) is the number of growing self-avoiding walks with n+3 edges on the grid graph of integer points (x,y) with x >= 0 and y in {0, 1} and with a trapped endpoint. - Jay Pantone, Jul 26 2024

Examples

			The Boolean complex of Coxeter group A_4 is homotopy equivalent to the wedge of 2 spheres S^3, which has Euler characteristic 1 - 2 = -1.
		

Crossrefs

Programs

Formula

G.f.: 1/(1 - 2*x^2 - x^3).
a(n) = 2*a(n-2) + a(n-3).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} (-1)^(n-k-j)binomial(j, k). Diagonal sums of A059260. - Paul Barry, Sep 23 2004
From Paul Barry, Oct 04 2004: (Start)
a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2k)2^(3k-n).
a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2k)2^k(1/2)^(n-2k). (End)
From Paul Barry, Oct 25 2004: (Start)
G.f.: 1/((1+x)*(1-x-x^2)).
a(n) = Sum_{k=0..n} binomial(n-k-1, k). (End)
a(n) = |1 + (-1)^(n-1)*Fibonacci(n-1)|. - Bridget Tenner, Jun 04 2008
a(n) = A000045(n) + A033999(n). - Michel Marcus, Nov 14 2013
a(n) = Fibonacci(n+1) - a(n-1), with a(0) = 1. - Franklin T. Adams-Watters, Mar 26 2014
a(n) = b(n+1) where b(n) = b(n-1) + b(n-2) + (-1)^(n+1), b(0) = 0, b(1) = 1. See also A098600. - Richard R. Forberg, Aug 30 2014
a(n) = b(n+2) where b(n) = Sum_{k=1..n} b(n-k)*A000931(k+1), b(0) = 1. - J. Conrad, Apr 19 2017
a(n) = Sum_{j=n+1..2*n+1} F(j) mod Sum_{j=0..n} F(j) for n > 2 and F(j)=A000045(j). - Art Baker, Jan 20 2019

A239798 Decimal expansion of the midsphere radius in a regular dodecahedron with unit edges.

Original entry on oeis.org

1, 3, 0, 9, 0, 1, 6, 9, 9, 4, 3, 7, 4, 9, 4, 7, 4, 2, 4, 1, 0, 2, 2, 9, 3, 4, 1, 7, 1, 8, 2, 8, 1, 9, 0, 5, 8, 8, 6, 0, 1, 5, 4, 5, 8, 9, 9, 0, 2, 8, 8, 1, 4, 3, 1, 0, 6, 7, 7, 2, 4, 3, 1, 1, 3, 5, 2, 6, 3, 0, 2, 3, 1, 4, 0, 9, 4, 5, 1, 2, 2, 4, 8, 5, 3, 6, 0, 3, 6, 0
Offset: 1

Views

Author

Stanislav Sykora, Mar 27 2014

Keywords

Comments

In a regular polyhedron, the midsphere is tangent to all edges.
Apart from leading digits the same as A019863 and A019827. - R. J. Mathar, Mar 30 2014

Examples

			1.30901699437494742410229341718281905886015458990288143106772431135263...
		

Crossrefs

Midsphere radii in Platonic solids: A020765 (tetrahedron), A020761 (octahedron), A010503 (cube), A019863 (icosahedron).

Programs

  • Maple
    Digits:=100: evalf((3+sqrt(5))/4); # Wesley Ivan Hurt, Mar 27 2014
  • Mathematica
    RealDigits[GoldenRatio^2/2,10,105][[1]] (* Vaclav Kotesovec, Mar 27 2014 *)
  • PARI
    (3+sqrt(5))/4

Formula

Equals phi^2/2, phi being the golden ratio (A001622).
Equals (3+sqrt(5))/4.
Equals lim_{n->oo} A000045(n)/A066983(n). - Dimitri Papadopoulos, Nov 23 2023
Equals Product_{k>=2} (1 + (-1)^k/A001654(k)). - Amiram Eldar, Dec 02 2024
Equals A094884^2 = A104457/2 = 10/A187799. - Hugo Pfoertner, Dec 02 2024

A069403 a(n) = 2*Fibonacci(2*n+1) - 1.

Original entry on oeis.org

1, 3, 9, 25, 67, 177, 465, 1219, 3193, 8361, 21891, 57313, 150049, 392835, 1028457, 2692537, 7049155, 18454929, 48315633, 126491971, 331160281, 866988873, 2269806339, 5942430145, 15557484097, 40730022147, 106632582345, 279167724889, 730870592323, 1913444052081
Offset: 0

Views

Author

R. H. Hardin, Mar 22 2002

Keywords

Comments

Half the number of n X 3 binary arrays with a path of adjacent 1's and a path of adjacent 0's from top row to bottom row.
Indices of A017245 = 9*n + 7 = 7, 16, 25, 34, for submitted A153819 = 16, 34, 88,. A153819(n) = 9*a(n) + 7 = 18*F(2*n+1) -2; F(n) = Fibonacci = A000045, 2's = A007395. Other recurrence: a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3). - Paul Curtz, Jan 02 2009

Crossrefs

Cf. 1 X n A000225, 2 X n A016269, vertical path of 1 A069361-A069395, vertical paths of 0+1 A069396-A069416, vertical path of 1 not 0 A069417-A069428, no vertical paths A069429-A069447, no horizontal or vertical paths A069448-A069452.
Equals A052995 - 1.
Bisection of A001595, A062114, A066983.

Programs

  • GAP
    List([0..30], n-> 2*Fibonacci(2*n+1)-1); # G. C. Greubel, Jul 11 2019
  • Magma
    [2*Fibonacci(2*n+1)-1: n in [0..30]]; // Vincenzo Librandi, Apr 18 2011
    
  • Mathematica
    a[n_]:= a[n] = 3a[n-1] - 3a[n-3] + a[n-4]; a[0] = 1; a[1] = 3; a[2] = 9; a[3] = 25; Table[ a[n], {n, 0, 30}]
    Table[2*Fibonacci[2*n+1]-1, {n,0,30}] (* G. C. Greubel, Apr 22 2018 *)
    LinearRecurrence[{4,-4,1},{1,3,9},30] (* Harvey P. Dale, Sep 22 2020 *)
  • PARI
    a(n) = 2*fibonacci(2*n+1)-1 \\ Charles R Greathouse IV, Jun 11 2015
    
  • PARI
    Vec((1-x+x^2)/((1-x)*(1-3*x+x^2)) + O(x^30)) \\ Colin Barker, Nov 02 2016
    
  • Sage
    [2*fibonacci(2*n+1)-1 for n in (0..30)] # G. C. Greubel, Jul 11 2019
    

Formula

a(0) = 1, a(1) = 3, a(2) = 9, a(3) = 25; a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
a(n) = 3*a(n-1) - a(n-2) + 1 for n>1, a(1) = 3, a(0) = 0. - Reinhard Zumkeller, May 02 2006
From R. J. Mathar, Feb 23 2009: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3).
G.f.: (1-x+x^2)/((1-x)*(1-3*x+x^2)). (End)
a(n) = 1 + 2*Sum_{k=0..n} Fibonacci(2*k) = 1+2*A027941(n). - Gary Detlefs, Dec 07 2010
a(n) = (2^(-n)*(-5*2^n -(3-sqrt(5))^n*(-5+sqrt(5)) +(3+sqrt(5))^n*(5+sqrt(5))))/5. - Colin Barker, Nov 02 2016

Extensions

Simpler definition from Vladeta Jovovic, Mar 19 2003

A095344 Length of n-th string generated by a Kolakoski(9,1) rule starting with a(1)=1.

Original entry on oeis.org

1, 1, 9, 9, 49, 81, 281, 601, 1729, 4129, 11049, 27561, 71761, 182001, 469049, 1197049, 3073249, 7861441, 20154441, 51600201, 132217969, 338618769, 867490649, 2221965721, 5691928321, 14579791201, 37347504489, 95666669289, 245056687249, 627723364401
Offset: 1

Views

Author

Benoit Cloitre, Jun 03 2004

Keywords

Comments

Each string is derived from the previous string using the Kolakoski(9,1) rule and the additional condition: "string begins with 1 if previous string ends with 9 and vice versa". The strings are 1 -> 9 -> 111111111 -> 919191919 -> 11111111191111111119... -> ... and each one contains 1,1,9,9,31,... elements.

Crossrefs

Programs

  • GAP
    a:=[1,1,9];; for n in [4..35] do a[n]:=5*a[n-2]+4*a[n-3]; od; a; # G. C. Greubel, Dec 26 2019
  • Haskell
    a095344 n = a095344_list !! (n-1)
    a095344_list = tail xs where
       xs = 1 : 1 : 1 : zipWith (-) (map (* 5) $ zipWith (+) (tail xs) xs) xs
    -- Reinhard Zumkeller, Aug 16 2013
    
  • Magma
    R:=PowerSeriesRing(Integers(), 35); Coefficients(R!( x*(1+x+ 4*x^2)/((1+x)*(1-x-4*x^2)) )); // G. C. Greubel, Dec 26 2019
    
  • Maple
    seq(simplify(2*(-1)^n -(2/I)^n*(ChebyshevU(n, I/4) -2*I*ChebyshevU(n-1, I/4)) ), n = 1..35); # G. C. Greubel, Dec 26 2019
  • Mathematica
    Table[2*(-1)^n - 2^n*(Fibonacci[n+1, 1/2] - 2*Fibonacci[n, 1/2]), {n,35}] (* G. C. Greubel, Dec 26 2019 *)
    LinearRecurrence[{0,5,4},{1,1,9},40] (* Harvey P. Dale, Oct 12 2022 *)
  • PARI
    Vec(x*(1+x+4*x^2)/((1+x)*(1-x-4*x^2)) + O(x^50)) \\ Colin Barker, Apr 20 2016
    
  • PARI
    vector(35, n, round( 2*(-1)^n - (2/I)^n*(polchebyshev(n, 2, I/4) -2*I*polchebyshev(n-1, 2, I/4)) )) \\ G. C. Greubel, Dec 26 2019
    
  • Sage
    def A095344_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x+4*x^2)/((1+x)*(1-x-4*x^2)) ).list()
    a=A095344_list(35); a[1:] # G. C. Greubel, Dec 26 2019
    

Formula

a(1) = a(2) = 1; for n>1, a(n) = a(n-1) + 4*a(n-2) - 4*(-1)^n.
G.f.: x*(1 + x + 4*x^2)/((1 + x)*(1 - x - 4*x^2)). - Colin Barker, Mar 25 2012
a(n) = 5*a(n-2) + 4*a(n-3). - Colin Barker, Mar 25 2012
a(n) = 2*(-1)^n + (2^(-1-n)*(-(-7+sqrt(17))*(1+sqrt(17))^n - (1-sqrt(17))^n*(7+sqrt(17))))/sqrt(17). - Colin Barker, Apr 20 2016
a(n) = 2*(-1)^n - 2^n*(Fibonacci(n+1, 1/2) - 2*Fibonacci(n, 1/2)) = 2*(-1)^n - (2/I)^n*(ChebyshevU(n, I/4) - 2*I*ChebyshevU(n-1, I/4)). - G. C. Greubel, Dec 26 2019

A108103 Fixed point of the square of the morphism: 1->3, 2->1, 3->121, starting with 1.

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 3, 1
Offset: 1

Views

Author

Roger L. Bagula, Jun 03 2005

Keywords

Comments

Old name was: A Fibonacci like substitution for three-symbol substitution with characteristic polynomial: x^3-2*x-1.
This sequence gives a three-symbol substitution for A095345.
From Michel Dekking, Jan 06 2018: (Start) What is probably meant by this statement is that A095345 is a morphic sequence, i.e., a letter-to-letter projection of a fixed point of the morphism tau given by tau(1)=121, tau(2)=3, tau(3)=313, followed by the morphism pi given by pi(1)=1, pi(2)=1, pi(3)=3.
This deserves a proof. In fact a proof can only be given if one formulates a joint statement about the sequences v:=A095345=1113111313... and w:=A095346=3131113...., because these two sequences are defined in a loop. Let D be the so-called differentiation operator which maps a word to the lengths of its runs, as studied in [Dekking, 1981]. For example D(1113111) = 313.
The words v and w by definition satisfy D(v)=w, D(w)=v. They are in fact points of period 2 for D (cf. [Dekking,1995]).
Claim: v=A095345 equals pi(x), where x is the fixed point of tau with x(1)=1, and w=A095346 equals pi(y), where y is the fixed point of tau with y(1)=3.
Proof: This is easily shown by induction on n=2,3,..., proving that tau^(n+1)(1) and tau^(n)(3) satisfy D(pi(tau^(n+1)(1)) = pi(tau^n(3)) & D(pi(tau^n(3)) = pi(tau^n(1)).
(End)
Real Salem Roots: {{x -> -1.}, {x -> -0.618034}, {x -> 1.61803}}.
From Michel Dekking, Dec 27 2017: (Start)
Let tau be the morphism squared: tau(1)=121, tau(2)=3, tau(3)=313.
Then tau(a)=a.
Claims:
(A) a(2n-1) = 1 for n = 1,2,....
(B) a(2n) = A282162(n-1) for n = 1,2,....
Proof of (A): Obviously 2 only occurs in 121, but this implies that also 3 only occurs in 131.
Proof of (B): Let R be the 'remove 1' operator, e.g., R(12131) = 23.
Let psi be the square of the Fibonacci morphism on the alphabet {3,2}: psi(3)=323, psi(2)=32. One proves by induction that R(tau^k(1))3 = 2psi^(k-1)(3) and R(tau^k(2))2 = 3psi^(k-1)(2) for k=1,2,.... This implies (B): see CROSSREFS in A282162.
We give the more complicated induction step of the two:
R(tau^(k+1)(2))2 = R(tau^k(3))2 =
R(tau^(k-1)(3))R(tau^(k-1)(1))R(tau^(k-1)(3))2 =
R(tau^k(2))2psi^(k-2)(3)3^(-1)R(tau^k(2))2 =
3psi^(k-2)(2)psi^(k-2)(3)psi^(k-1)(2) = 3psi^(k-2)(32332)=
3psi^k(2).
(End)

References

  • F. M. Dekking: "What is the long range order in the Kolakoski sequence?" in: The Mathematics of Long-Range Aperiodic Order, ed. R. V. Moody, Kluwer, Dordrecht (1997), pp. 115-125.

Crossrefs

Programs

  • Mathematica
    s[1] = {3}; s[2] = {1}; s[3] = {1, 2, 1}; t[a_] := Flatten[s /@ a]; p[0] = {1}; p[1] = t[p[0]]; p[n_] := t[p[n - 1]] a = p[12]
    Nest[Flatten[# /. {1 -> {3}, 2 -> {1}, 3 -> {1, 2, 1}}] &, {1}, 10] (* Robert G. Wilson v, Nov 05 2015 *)
  • Python
    from math import isqrt
    def A108103(n): return 1 if n&1 else 1+((k:=n>>1)+isqrt(m:=5*k**2)>>1)-(k-1+isqrt(m-10*k+5)>>1) # Chai Wah Wu, May 05 2025

Formula

1->121, 2->3, 3->313.

Extensions

New name from Joerg Arndt, Jan 17 2013
New name from Robert G. Wilson v, Nov 05 2015
Name corrected by Michel Dekking, Dec 27 2017
Offset 1 from Michel Dekking, Jan 01 2020

A095342 Number of elements in n-th string generated by a Kolakoski(5,1) rule starting with a(1)=1.

Original entry on oeis.org

1, 1, 5, 5, 17, 25, 61, 109, 233, 449, 917, 1813, 3649, 7273, 14573, 29117, 58265, 116497, 233029, 466021, 932081, 1864121, 3728285, 7456525, 14913097, 29826145, 59652341, 119304629, 238609313, 477218569, 954437197, 1908874333, 3817748729
Offset: 1

Views

Author

Benoit Cloitre, Jun 03 2004

Keywords

Comments

Each string is derived from the previous string using the Kolakoski(5,1) rule and the additional condition: "string begins with 1 if previous string ends with 5 and vice versa". The strings are 1 -> 5 -> 11111 -> 51515 -> 11111511111511111 -> ... and each one contains 1,1,5,5,17,... elements.
Equals inverse binomial transform of A025579. - Gary W. Adamson, Mar 04 2010

Crossrefs

Cf. A025579 . - Gary W. Adamson, Mar 04 2010

Programs

  • GAP
    List([1..35], n-> (2^(n+2) + (-1)^n*(5-6*n))/9); # G. C. Greubel, Dec 26 2019
  • Magma
    [(2^(n+2) + (-1)^n*(5-6*n))/9: n in [1..35]]; // G. C. Greubel, Dec 26 2019
    
  • Maple
    seq( (2^(n+2) + (-1)^n*(5-6*n))/9, n=1..35); # G. C. Greubel, Dec 26 2019
  • Mathematica
    Table[(2^(n+2) + (-1)^n*(5-6*n))/9, {n,35}] (* G. C. Greubel, Dec 26 2019 *)
  • PARI
    vector(35, n, (2^(n+2) + (-1)^n*(5-6*n))/9) \\ G. C. Greubel, Dec 26 2019
    
  • Sage
    [(2^(n+2) + (-1)^n*(5-6*n))/9 for n in (1..35)] # G. C. Greubel, Dec 26 2019
    

Formula

a(1) = a(2) = 1, a(n) = a(n-1) + 2*a(n-2) - 2*(-1)^n.
From R. J. Mathar, Apr 01 2010: (Start)
G.f.: x*(1+x+2*x^2)/((1-2*x)*(1+x)^2).
a(n) = (2^(n+2) + (-1)^n*(5-6*n))/9. (End)
E.g.f.: (exp(2*x) - 9 + (5+6*x)*exp(-x))/9. - G. C. Greubel, Dec 26 2019
Showing 1-10 of 16 results. Next