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 48 results. Next

A006190 a(n) = 3*a(n-1) + a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 3, 10, 33, 109, 360, 1189, 3927, 12970, 42837, 141481, 467280, 1543321, 5097243, 16835050, 55602393, 183642229, 606529080, 2003229469, 6616217487, 21851881930, 72171863277, 238367471761, 787274278560, 2600190307441, 8587845200883, 28363725910090
Offset: 0

Views

Author

Keywords

Comments

Denominators of continued fraction convergents to (3+sqrt(13))/2. - Benoit Cloitre, Jun 14 2003
a(n) and A006497(n) occur in pairs: (a,b): (1,3), (3,11), (10,36), (33,119), (109,393), ... such that b^2 - 13a^2 = 4(-1)^n. - Gary W. Adamson, Jun 15 2003
Form the 4-node graph with matrix A = [1,1,1,1; 1,1,1,0; 1,1,0,1; 1,0,1,1]. Then this sequence counts the walks of length n from the vertex with degree 5 to one (any) of the other vertices. - Paul Barry, Oct 02 2004
a(n+1) is the binomial transform of A006138. - Paul Barry, May 21 2006
a(n+1) is the diagonal sum of the exponential Riordan array (exp(3x),x). - Paul Barry, Jun 03 2006
Number of paths in the right half-plane from (0,0) to the line x=n-1, consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0). Example: a(3)=10 because we have hh, H, UD, DU, hU, Uh, UU, hD, Dh and DD. - Emeric Deutsch, Sep 03 2007
Equals INVERT transform of A000129. Example: a(5) = 109 = (29, 12, 5, 2, 1) dot (1, 1, 3, 10, 33) = (29 + 12 + 15 + 20 + 33). - Gary W. Adamson, Aug 06 2010
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 3's along the main diagonal, 1's along the superdiagonal and subdiagonal, and 0's everywhere else. - John M. Campbell, Jul 08 2011
These numbers could also be called "bronze Fibonacci numbers". Indeed, for n >= 1, F(n+1) = ceiling(phi*F(n)), if n is even and F(n+1) = floor(phi*F(n)), if n is odd, where phi is the golden ratio; analogously, for Pell numbers (A000129), or "silver Fibonacci numbers", P(n+1) = ceiling(delta*a(n)), if n is even and P(n+1) = floor(delta*a(n)), if n is odd, where delta = delta_S = 1 + sqrt(2) is the silver ratio. Here, for n >= 1, we have a(n+1) = ceiling(c*a(n)), if n is even and a(n+1) = floor(c*a(n)), if n is odd, where c = (3 + sqrt(13))/2 is the bronze ratio (cf. comment in A098316). - Vladimir Shevelev, Feb 23 2013
Let p(n,x) denote the Fibonacci polynomial, defined by p(1,x) = 1, p(2,x) = x, p(n,x) = x*p(n-1,x) + p(n-2,x). Let q(n,x) be the numerator polynomial of the rational function p(n, x + 1 + 1/x). Then q(n,1) = a(n). - Clark Kimberling, Nov 04 2013
The (1,1)-entry of the matrix A^n where A = [0,1,0; 1,2,1; 1,1,2]. - David Neil McGrath, Jul 18 2014
a(n+1) counts closed walks on K2, containing three loops on the other vertex. Equivalently the (1,1)-entry of A^(n+1) where the adjacency matrix of digraph is A = (0,1; 1,3). - David Neil McGrath, Oct 29 2014
For n >= 1, a(n) equals the number of words of length n-1 on alphabet {0,1,2,3} avoiding runs of zeros of odd lengths. - Milan Janjic, Jan 28 2015
With offset 1 is the INVERTi transform of A001076. - Gary W. Adamson, Jul 24 2015
Apart from the initial 0, this is the p-INVERT transform of (1,0,1,0,1,0,...) for p(S) = 1 - 3 S. See A291219. - Clark Kimberling, Sep 02 2017
From Rogério Serôdio, Mar 30 2018: (Start)
This is a divisibility sequence (i.e., if n|m then a(n)|a(m)).
gcd(a(n),a(n+k)) = a(gcd(n, k)) for all positive integers n and k. (End)
Numbers of straight-chain fatty acids involving oxo and/or hydroxy groups, if cis-/trans isomerism and stereoisomerism are neglected. - Stefan Schuster, Apr 04 2018
Number of 3-compositions of n restricted to odd parts (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
From Michael A. Allen, Jan 25 2023: (Start)
Also called the 3-metallonacci sequence; the g.f. 1/(1-k*x-x^2) gives the k-metallonacci sequence.
a(n+1) is the number of tilings of an n-board (a board with dimensions n X 1) using unit squares and dominoes (with dimensions 2 X 1) if there are 3 kinds of squares available. (End)
a(n) is the number of compositions of n when there are P(k) sorts of parts k, with k,n >= 1, P(k) = A000129(k) is the k-th Pell number (see example below). - Enrique Navarrete, Dec 15 2023

Examples

			From _Enrique Navarrete_, Dec 15 2023: (Start)
From the comment on compositions with Pell number of parts, A000129(k), there are A000129(1)=1 type of 1, A000129(2)=2 types of 2, A000129(3)=5 types of 3, A000129(4)=12 types of 4, A000129(5)=29 types of 5 and A000129(6)=70 types of 6.
The following table gives the number of compositions of n=6:
Composition, number of such compositions, number of compositions of this type:
  6,              1,     70;
  5+1,            2,     58;
  4+2,            2,     48;
  3+3,            1,     25;
  4+1+1,          3,     36;
  3+2+1,          6,     60;
  2+2+2,          1,      8;
  3+1+1+1,        4,     20;
  2+2+1+1,        6,     24;
  2+1+1+1+1,      5,     10;
  1+1+1+1+1+1,    1,      1;
for a total of a(6)=360 compositions of n=6. (End).
		

References

  • H. L. Abbott and D. Hanson, A lattice path problem, Ars Combin., 6 (1978), 163-178.
  • A. Brousseau, Fibonacci and Related Number Theoretic Tables. Fibonacci Association, San Jose, CA, 1972, p. 128.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • L.-N. Machaut, Query 3436, L'Intermédiaire des Mathématiciens, 16 (1909), 62-63. - N. J. A. Sloane, Mar 08 2022

Crossrefs

Row sums of Pascal's rhombus (A059317). Also row sums of triangle A054456(n, m).
Sequences with g.f. 1/(1-k*x-x^2) or x/(1-k*x-x^2): A000045 (k=1), A000129 (k=2), this sequence (k=3), A001076 (k=4), A052918 (k=5), A005668 (k=6), A054413 (k=7), A041025 (k=8), A099371 (k=9), A041041 (k=10), A049666 (k=11), A041061 (k=12), A140455 (k=13), A041085 (k=14), A154597 (k=15), A041113 (k=16), A178765 (k=17), A041145 (k=18), A243399 (k=19), A041181 (k=20).
Cf. A006497, A052906, A175182 (Pisano periods), A201001 (prime subsequence), A092936 (squares).
Cf. A243399.

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=3*a[n-1]+a[n-2]; od; a; # Muniru A Asiru, Mar 31 2018
  • Haskell
    a006190 n = a006190_list !! n
    a006190_list = 0 : 1 : zipWith (+) (map (* 3) $ tail a006190_list) a006190_list
    -- Reinhard Zumkeller, Feb 19 2011
    
  • Magma
    [ n eq 1 select 0 else n eq 2 select 1 else 3*Self(n-1)+Self(n-2): n in [1..30] ]; // Vincenzo Librandi, Aug 19 2011
    
  • Maple
    a[0]:=0: a[1]:=1: for n from 2 to 35 do a[n]:= 3*a[n-1]+a[n-2] end do: seq(a[n],n=0..30); # Emeric Deutsch, Sep 03 2007
    A006190:=-1/(-1+3*z+z**2); # Simon Plouffe in his 1992 dissertation, without the leading 0
    seq(combinat[fibonacci](n,3),n=0..30); # R. J. Mathar, Dec 07 2011
  • Mathematica
    a[n_] := (MatrixPower[{{1, 3}, {1, 2}}, n].{{1}, {1}})[[2, 1]]; Table[ a[n], {n, -1, 24}] (* Robert G. Wilson v, Jan 13 2005 *)
    LinearRecurrence[{3,1},{0,1},30] (* or *) CoefficientList[Series[x/ (1-3x-x^2), {x,0,30}], x] (* Harvey P. Dale, Apr 20 2011 *)
    Table[If[n==0, a1=1; a0=0, a2=a1; a1=a0; a0=3*a1+a2], {n, 0, 30}] (* Jean-François Alcover, Apr 30 2013 *)
    Table[Fibonacci[n, 3], {n, 0, 30}] (* Vladimir Reshetnikov, May 08 2016 *)
  • PARI
    a(n)=if(n<1,0,contfracpnqn(vector(n,i,2+(i>1)))[2,1])
    
  • PARI
    a(n)=([1,3;1,2]^n)[2,1] \\ Charles R Greathouse IV, Mar 06 2014
    
  • PARI
    concat([0],Vec(x/(1-3*x-x^2)+O(x^30))) \\ Joerg Arndt, Apr 30 2013
    
  • Sage
    [lucas_number1(n,3,-1) for n in range(0, 30)] # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/(1 - 3*x - x^2).
From Benoit Cloitre, Jun 14 2003: (Start)
a(3*n) = 2*A041019(5*n-1), a(3*n+1) = A041019(5*n), a(3*n+2) = A041019(5*n+3).
a(2*n) = 3*A004190(n-1); a(3*n) = 10*A041613(n-1) for n >= 1. (End)
From Gary W. Adamson, Jun 15 2003: (Start)
a(n-1) + a(n+1) = A006497(n).
A006497(n)^2 - 13*a(n)^2 = 4(-1)^n. (End)
a(n) = U(n-1, (3/2)i)(-i)^(n-1), i^2 = -1. - Paul Barry, Nov 19 2003
a(n) = Sum_{k=0..n-1} binomial(n-k-1,k)*3^(n-2*k-1). - Paul Barry, Oct 02 2004
a(n) = F(n, 3), the n-th Fibonacci polynomial evaluated at x=3.
Let M = {{0, 1}, {1, 3}}, v[1] = {0, 1}, v[n] = M.v[n - 1]; then a(n) = Abs[v[n][[1]]]. - Roger L. Bagula, May 29 2005 [Or a(n) = [M^(n+1)]{1,1}. - _L. Edson Jeffery, Aug 27 2013]
From Paul Barry, May 21 2006: (Start)
a(n+1) = Sum_{k=0..n} Sum_{j=0..n-k} C(k,j)*C(n-j,k)*2^(k-j).
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(k,j)*C(n-j,k)*2^(n-j-k).
a(n+1) = Sum_{k=0..floor(n/2)} C(n-k,k)*3^(n-2*k).
a(n) = Sum_{k=0..n} C(k,n-k)*3^(2*k-n). (End)
E.g.f.: exp(3*x/2)*sinh(sqrt(13)*x/2)/(sqrt(13)/2). - Paul Barry, Jun 03 2006
a(n) = (ap^n - am^n)/(ap - am), with ap = (3 + sqrt(13))/2, am = (3 - sqrt(13))/2.
Let C = (3 + sqrt(13))/2 = exp arcsinh(3/2) = 3.3027756377... Then C^n, n > 0 = a(n)*(1/C) + a(n+1). Let X = the 2 X 2 matrix [0, 1; 1, 3]. Then X^n = [a(n-1), a(n); a(n), a(n+1)]. - Gary W. Adamson, Dec 21 2007
1/3 = 3/(1*10) + 3/(3*33) + 3/(10*109) + 3/(33*360) + 3/(109*1189) + ... . - Gary W. Adamson, Mar 16 2008
a(n) = ((3 + sqrt(13))^n - (3 - sqrt(13))^n)/(2^n*sqrt(13)). - Al Hakanson (hawkuu(AT)gmail.com), Jan 12 2009
a(p) == 13^((p-1)/2) mod p, for odd primes p. - Gary W. Adamson, Feb 22 2009
From Johannes W. Meijer, Jun 12 2010: (Start)
Limit_{k->oo} a(n+k)/a(k) = (A006497(n) + a(n)*sqrt(13))/2.
Limit_{n->oo} A006497(n)/a(n) = sqrt(13). (End)
Sum_{k>=1} (-1)^(k-1)/(a(k)*a(k+1)) = (sqrt(13)-3)/2. - Vladimir Shevelev, Feb 23 2013
From Vladimir Shevelev, Feb 24 2013: (Start)
(1) Expression a(n+1) via a(n): a(n+1) = (3*a(n) + sqrt(13*a(n)^2 + 4*(-1)^n))/2;
(2) a^2(n+1) - a(n)*a(n+2) = (-1)^n;
(3) Sum_{k=1..n} (-1)^(k-1)/(a(k)*a(k+1)) = a(n)/a(n+1);
(4) a(n)/a(n+1) = (sqrt(13)-3)/2 + r(n), where |r(n)| < 1/(a(n+1)*a(n+2)). (End)
a(n) = sqrt(13*(A006497(n))^2 + (-1)^(n-1)*52)/13. - Vladimir Shevelev, Mar 13 2013
Sum_{n >= 1} 1/( a(2*n) + 1/a(2*n) ) = 1/3; Sum_{n >= 1} 1/( a(2*n + 1) - 1/a(2*n + 1) ) = 1/9. - Peter Bala, Mar 26 2015
From Rogério Serôdio, Mar 30 2018: (Start)
Some properties:
(1) a(n)*a(n+1) = 3*Sum_{k=1..n} a(k)^2;
(2) a(n)^2 + a(n+1)^2 = a(2*n+1);
(3) a(n)^2 - a(n-2)^2 = 3*a(n-1)*(a(n) + a(n-2));
(4) a(m*(p+1)) = a(m*p)*a(m+1) + a(m*p-1)*a(m);
(5) a(n-k)*a(n+k) = a(n)^2 + (-1)^(n+k+1)*a(k)^2;
(6) a(2*n) = a(n)*(3*a(n) + 2*a(n-1));
(7) 3*Sum_{k=2..n+1} a(k)*a(k-1) is equal to a(n+1)^2 if n odd, and is equal to a(n+1)^2 - 1 if n is even;
(8) a(n) = alpha(k)*a(n-2*k+1) + a(n-4*k+2), where alpha(k) = ap^(2*k-1) + am^(2*k-1), with ap = (3 + sqrt(13))/2, am = (3 - sqrt(13))/2;
(9) 131|Sum_{k=n..n+9} a(k), for all positive n. (End)
From Kai Wang, Feb 10 2020: (Start)
a(n)^2 - a(n+r)*a(n-r) = (-1)^(n-r)*a(r)^2 - Catalan's identity.
arctan(1/a(2n)) - arctan(1/a(2n+2)) = arctan(a(2)/a(2n+1)).
arctan(1/a(2n)) = Sum_{m>=n} arctan(a(2)/a(2m+1)).
The same formula holds for Fibonacci numbers and Pell numbers. (End)
a(n+2) = 3^(n+1) + Sum_{k=0..n} a(k)*3^(n-k). - Greg Dresden and Gavron Campbell, Feb 22 2022
G.f. = 1/(1-Sum_{k>=1} P(k)*x^k), P(k)=A000129(k) (with a(0)=1). - Enrique Navarrete, Dec 17 2023
G.f.: x/(1 - 3*x - x^2) = Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (m*k + 3 - m + x)/(1 + m*k*x) ) for arbitrary m (a telescoping series). - Peter Bala, May 08 2024
Sum_{n>=0} a(n)/phi^(3*n) = 1, where phi = A001622 is the golden ratio. - Diego Rattaggi, Apr 07 2025

Extensions

Second formula corrected by Johannes W. Meijer, Jun 02 2010

A291382 p-INVERT of (1,1,0,0,0,0,...), where p(S) = 1 - 2 S - S^2.

Original entry on oeis.org

2, 7, 22, 70, 222, 705, 2238, 7105, 22556, 71608, 227332, 721705, 2291178, 7273743, 23091762, 73308814, 232731578, 738846865, 2345597854, 7446508273, 23640235416, 75050038224, 238259397096, 756395887969, 2401310279090, 7623377054503, 24201736119310
Offset: 0

Views

Author

Clark Kimberling, Sep 04 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,1,0,0,0,...) = A019590, in some cases t(1,1,0,0,0,...) is a shifted version of the cited sequence:
p(S) t(1,1,0,0,0,...)
1 - S A000045 (Fibonacci numbers)
1 - S^2 A094686
1 - S^3 A115055
1 - S^4 A291379
1 - S^5 A281380
1 - S^6 A281381
1 - 2 S A002605
1 - 3 S A125145
(1 - S)^2 A001629
(1 - S)^3 A001628
(1 - S)^4 A001629
(1 - S)^5 A001873
(1 - S)^6 A001874
1 - S - S^2 A123392
1 - 2 S - S^2 A291382
1 - S - 2 S^2 A124861
1 - 2 S - S^2 A291383
(1 - 2 S)^2 A073388
(1 - 3 S)^2 A291387
(1 - 5 S)^2 A291389
(1 - 6 S)^2 A291391
(1 - S)(1 - 2 S) A291393
(1 - S)(1 - 3 S) A291394
(1 - 2 S)(1 - 3 S) A291395
(1 - S)(1 - 2 S) A291393
(1 - S)(1 - 2 S)(1 - 3 S) A291396
1 - S - S^3 A291397
1 - S^2 - S^3 A291398
1 - S - S^2 - S^3 A186812
1 - S - S^2 - S^3 - S^4 A291399
1 - S^2 - S^4 A291400
1 - S - S^4 A291401
1 - S^3 - S^4 A291402
1 - 2 S^2 - S^4 A291403
1 - S^2 - 2 S^4 A291404
1 - 2 S^2 - 2 S^4 A291405
1 - S^3 - S^6 A291407
(1 - S)(1 - S^2) A291408
(1 - S^2)(1 - S)^2 A291409
1 - S - S^2 - 2 S^3 A291410
1 - 2 S - S^2 + S^3 A291411
1 - S - 2 S^2 + S^3 A291412
1 - 3 S + S^2 + S^3 A291413
1 - 2 S + S^3 A291414
1 - 3 S + S^2 A291415
1 - 4 S + S^2 A291416
1 - 4 S + 2 S^2 A291417

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + x^2; p = 1 - 2 s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A019590 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291382 *)

Formula

G.f.: (-2 - 3 x - 2 x^2 - x^3)/(-1 + 2 x + 3 x^2 + 2 x^3 + x^4).
a(n) = 2*a(n-1) + 3*a(n-2) + 2*a(n-3) + a(n-4) for n >= 5.

A291728 p-INVERT of (1,0,1,0,0,0,0,...), where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 2, 4, 9, 17, 35, 70, 142, 285, 576, 1160, 2340, 4716, 9510, 19171, 38653, 77926, 157110, 316747, 638599, 1287479, 2595698, 5233196, 10550681, 21271280, 42885152, 86460984, 174314476, 351436368, 708532813, 1428476905, 2879960190, 5806303628, 11706120825
Offset: 0

Views

Author

Clark Kimberling, Sep 08 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,0,1,0,0,0,0,...) = A154272, in some cases t(1,0,1,0,0,0,0,...) is a shifted (or differently indexed) version of the indicated sequence:
***
p(S) t(1,0,1,0,0,0,0,...)
1 - S A000930 (Narayana's cows sequence)
1 - S^2 A002478 (except for 0's)
1 - S^3 A291723
1 - S^5 A291724
(1 - S)^2 A291725
(1 - S)^3 A291726
(1 - S)^4 A291727
1 - S - S^2 A291728
1 - 2S - S^2 A291729
1 - 2S - 2S^2 A291730
(1 - 2S)^2 A291732
(1 - S)(1 - 2S) A291734
1 - S - S^3 A291735
1 - S^2 - S^3 A291736
1 - S - S^2 - S^3 A291737
1 - S - S^4 A291738
1 - S^3 - S^6 A291739
(1 - S)(1 - S^2) A291740
(1 - S)(1 + S^2) A291741

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + x^3; p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A154272 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291728 *)

Formula

G.f.: (-1 - x - x^2 - 2 x^3 - x^5)/(-1 + x + x^2 + x^3 + 2 x^4 + x^6).
a(n) = a(n-1) + a(n-2) + a(n-3) + 2*a(n-4) + a(n-6) for n >= 7.

A052542 a(n) = 2*a(n-1) + a(n-2), with a(0) = 1, a(1) = 2, a(2) = 4.

Original entry on oeis.org

1, 2, 4, 10, 24, 58, 140, 338, 816, 1970, 4756, 11482, 27720, 66922, 161564, 390050, 941664, 2273378, 5488420, 13250218, 31988856, 77227930, 186444716, 450117362, 1086679440, 2623476242, 6333631924, 15290740090, 36915112104, 89120964298, 215157040700
Offset: 0

Views

Author

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

Keywords

Comments

Apart from the initial 1, this sequence is simply twice the Pell numbers, A000129. - Antonio Alberto Olivares, Dec 31 2003
Image of 1/(1-2x) under the mapping g(x) -> g(x/(1+x^2)). - Paul Barry, Jan 16 2005
The intermediate convergents to 2^(1/2) begin with 4/3, 10/7, 24/17, 58/41; essentially, numerators = A052542 and denominators = A001333. - Clark Kimberling, Aug 26 2008
a(n) is the number of generalized compositions of n+1 when there are 2*i-2 different types of i, (i=1,2,...). - Milan Janjic, Aug 26 2010
Apart from the initial 1, this is the p-INVERT transform of (1,0,1,0,1,0,...) for p(S) = 1 - 2 S. See A291219. - Clark Kimberling, Sep 02 2017
Conjecture: Apart from the initial 1, a(n) is the number of compositions of two types of n having no even parts. - Gregory L. Simay, Feb 17 2018
For n>0, a(n+1) is the length of tau^n(10) where tau is the morphism: 1 -> 101, 0 -> 1. See Song and Wu. - Michel Marcus, Jul 21 2020
The above conjecture is true, as the g.f. can be written as 1/(1 - (2*x)/(1 - x^2)). - John Tyler Rascoe, Jun 01 2024

Crossrefs

Cf. A052906. Essentially first differences of A001333.

Programs

  • GAP
    a:=[2,4];; for n in [3..40] do a[n]:=2*a[n-1]+a[n-2]; od; a; # G. C. Greubel, May 09 2019
  • Haskell
    a052542 n = a052542_list !! n
    a052542_list = 1 : 2 : 4 : tail (zipWith (+)
                   (map (* 2) $ tail a052542_list) a052542_list)
    -- Reinhard Zumkeller, Feb 24 2015
    
  • Magma
    I:=[2,4]; [n le 2 select I[n] else 2*Self(n-1) +Self(n-2): n in [1..40]]; // G. C. Greubel, May 09 2019
    
  • Maple
    spec := [S,{S=Sequence(Prod(Union(Z,Z),Sequence(Prod(Z,Z))))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    A052542 := proc(n)
        option remember;
        if n <=2 then
            2^n;
        else
            2*procname(n-1)+procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, Sep 23 2016
    A052542List := proc(m) local A, P, n; A := [1,2]; P := [1,1];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([op(A), P[-2]]);
    A := [op(A), P[-1]] od; A end: A052542List(31); # Peter Luschny, Mar 26 2022
  • Mathematica
    Join[{1}, LinearRecurrence[{2, 1}, {2, 4}, 40]] (* Vladimir Joseph Stephan Orlovsky, Feb 22 2012 *)
  • PARI
    Vec((1-x^2)/(1-2*x-x^2) +O(x^40)) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    ((1-x^2)/(1-2*x-x^2)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, May 09 2019
    

Formula

G.f.: (1 - x^2)/(1 - 2*x - x^2).
Recurrence: a(0)=1, a(2)=4, a(1)=2, a(n) + 2*a(n+1) - a(n+2) = 0;
a(n) = Sum_{alpha = RootOf(-1+2*x+x^2)} (1/2)*(1-alpha)*alpha^(-n-1).
a(n) = 2*A001333(n-1) + a(n-1), n > 1. A001333(n)/a(n) converges to sqrt(1/2). - Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
Binomial transform of A094024. a(n) = 0^n + ((1 + sqrt(2))^n - (1 - sqrt(2))^n)/sqrt(2). - Paul Barry, Apr 22 2004
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k-1, k)2^(n-2k). - Paul Barry, Jan 16 2005
If p[i] = 2*(i mod 2) and if A is Hessenberg matrix of order n defined by A[i,j] = p[j-i+1], (i <= j), A[i,j] = -1, (i=j+1), and A[i,j] = 0 otherwise. Then, for n >= 1, a(n) = det A. - Milan Janjic, May 02 2010
a(n) = round(sqrt(Pell(2n) + Pell(2n-1))). - Richard R. Forberg, Jun 22 2014
a(n) = 2*A000129(n) + A000007(n) - Iain Fox, Nov 30 2017
a(n) = A000129(n) - A000129(n-2). - Gregory L. Simay, Feb 17 2018

A147600 Expansion of 1/(1 - 3*x^2 + x^4).

Original entry on oeis.org

1, 0, 3, 0, 8, 0, 21, 0, 55, 0, 144, 0, 377, 0, 987, 0, 2584, 0, 6765, 0, 17711, 0, 46368, 0, 121393, 0, 317811, 0, 832040, 0, 2178309, 0, 5702887, 0, 14930352, 0, 39088169, 0, 102334155, 0, 267914296, 0, 701408733, 0, 1836311903, 0, 4807526976, 0
Offset: 0

Views

Author

Roger L. Bagula, Nov 08 2008

Keywords

Comments

S(n,sqrt(5)), with the Chebyshev polynomials A049310, is an integer sequence in the real quadratic number field Q(sqrt(5)) with basis numbers <1,phi>, phi:=(1+sqrt(5))/2. S(n,sqrt(5)) = A(n) + 2*B(n)*phi, with A(n) = A005013(n+1)*(-1)^n and B(n) = a(n-1), n>=0, with a(-1)=0. - Wolfdieter Lang, Nov 24 2010
The sequence (s(n)) given by s(0) = 0 and s(n) = a(n-1) for n > 0 is the p-INVERT of (0, 1, 0, 1, 0, 1, ...) using p(S) = 1 - S^2; see A291219. - Clark Kimberling, Aug 30 2017
From Jean-François Alcover, Sep 24 2017: (Start)
Consider this array of successive differences:
0, 0, 0, 1, 0, 3, 0, 8, 0, 21, ...
0, 0, 1, -1, 3, -3, 8, -8, 21, -21, ...
0, 1, -2, 4, -6, 11, -16, 29, -42, 76, ...
1, -3, 6, -10, 17, -27, 45, -71, 118, -186, ...
-4, 9, -16, 27, -44, 72, -116, 189, -304, 495, ...
13, -25, 43, -71, 116, -188, 305, -493, 799, -1291, ...
-38, 68, -114, 187, -304, 493, -798, 1292, -2090, 3383, ...
...
First row = even-index Fibonacci numbers with interleaved zeros = this sequence right-shifted 3 positions.
Main diagonal = 0,0,-2,-10,-44,-188,-798,... = -A099919 right-shifted.
First upper subdiagonal = 0,1,4,17,72,305,1292,... = A001076 right-shifted.
Second upper subdiagonal = 0,-1,-6,-27,-116,-493,-2090,... = -A049651.
Third upper subdiagonal = 1,3,11,45,189,799,3383,... = A292278.
(End) (Comment based on an e-mail from Paul Curtz)

Examples

			G.f. = 1 + 3*x^2 + 8*x^4 + 21*x^6 + 55*x^8 + 144*x^10 + 377*x^12 + 987*x^14 + ...
		

Crossrefs

Programs

  • Magma
    [(1+(-1)^n)*Fibonacci(n+2)/2: n in [0..60]]; // G. C. Greubel, Oct 25 2022
    
  • Mathematica
    f[x_]= -1 -x +x^2; CoefficientList[Series[-1/(x^2*f[x]*f[1/x]), {x,0,60}], x]
    (* or *)
    M={{0,1,0,0}, {0,0,1,0}, {0,0,0,1}, {-1,0,3,0}}; v[0]= {1,0,3,0}; v[n_]:= v[n]= M.v[n-1]; Table[v[n][[1]], {n,0,60}]
    LinearRecurrence[{0,3,0,-1}, {1,0,3,0}, 60] (* Jean-François Alcover, Sep 23 2017 *)
  • PARI
    Vec(1/(1 - 3*x^2 + x^4)+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012
    
  • SageMath
    [((n+1)%2)*fibonacci(n+2) for n in range(60)] # G. C. Greubel, Oct 25 2022

Formula

O.g.f.: 1/(1 - 3*x^2 + x^4).
a(2*k) = F(2*(k+1)), a(2*k+1) = 0, k>=0, with F(n)=A000045(n). - Richard Choulet, Nov 13 2008
a(n) + a(n-1) + a(n-2) = A005013(n + 1). - Michael Somos, Apr 13 2012
a(n) = (2^(-2-n)*((1 + (-1)^n)*((-3+sqrt(5))*(-1+sqrt(5))^n + (1+sqrt(5))^n*(3+sqrt(5)))))/sqrt(5). - Colin Barker, Mar 28 2016

A239342 Number of 1's in all compositions of n into odd parts.

Original entry on oeis.org

0, 1, 2, 3, 6, 11, 20, 36, 64, 113, 198, 345, 598, 1032, 1774, 3039, 5190, 8839, 15016, 25452, 43052, 72685, 122502, 206133, 346346, 581136, 973850, 1630011, 2725254, 4551683, 7594748, 12660660, 21087448, 35094377, 58360134, 96979089, 161042110, 267248664
Offset: 0

Views

Author

Geoffrey Critzer, Mar 16 2014

Keywords

Comments

a(n+1) is the number of ways to tile a strip of length n+1 using white tiles of only odd lengths, with total length n, and one red square of length one. - Gregory L. Simay, Aug 14 2016
A029907, the number of compositions of n with exactly one even part, is equal to a(n+1-2) + a(n+1-4) + a(n+1-6) + ... - Gregory L. Simay, Aug 14 2016
Apart from the initial 0 and 1, this is the p-INVERT transform of (1,0,1,0,1,0,...) for p(S) = (1 - S)^2. See A291219. - Clark Kimberling, Sep 02 2017

Examples

			a(5) = 11 because in the compositions of 5 into odd parts there are a total of 11 1's: 5, 3+1+1, 1+3+1, 1+1+3, 1+1+1+1+1.
Let r represent the red square and 1,3,5 represent the possible odd lengths of the white squares for n=5. Then a(5+1) = a(6) = 20 because r combined with a tile of length 5 generates 2 compositions; r combined with 3,1,1 generates 12 compositions; and r combined with 1,1,1,1,1 generates 6 compositions. 2+12+6 = 20. - _Gregory L. Simay_, Aug 14 2016
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, Chapman and Hall, 2010, page 70.

Crossrefs

Programs

  • Mathematica
    nn=30;CoefficientList[Series[x (1-x^2)^2/(1-x-x^2)^2,{x,0,nn}],x]
    (* or *)
    Table[Count[Flatten[Level[Map[Permutations,IntegerPartitions[n,n,Table[2k+1,{k,0,n/2}]]],{2}]],1],{n,0,30}]

Formula

For n >= 4, a(n) = a(n-1) + a(n-2) + A000045(n-2).
G.f.: x*(1 - x^2)^2/(1 - x - x^2)^2.

A291227 p-INVERT of (0,1,0,1,0,1,...), where p(S) = 1 - S - 2*S^2.

Original entry on oeis.org

1, 3, 6, 17, 37, 96, 221, 551, 1302, 3189, 7625, 18528, 44537, 107835, 259830, 628105, 1515053, 3659808, 8832085, 21328159, 51481638, 124302381, 300068689, 724468416, 1748959153, 4222461747, 10193761254, 24610180673, 59413804789, 143438304480, 346289581709
Offset: 0

Views

Author

Clark Kimberling, Aug 25 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2),...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A291219 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    z = 60; s = x/(1 - x^2); p = 1 - s - 2 s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000035 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291227 *)

Formula

G.f.: (1 + 2 x - x^2)/(1 - x - 4 x^2 + x^3 + x^4).
a(n) = a(n-1) + 4*a(n-2) - a(n-3) - a(n-4) for n >= 5.
a(n-1) = (4*A000129(n) + (-1)^n*A000045(n))/3 for n >= 1. - Greg Dresden, Jan 01 2021

A291228 p-INVERT of (0,1,0,1,0,1,...), where p(S) = 1 - 2 S - 2 S^2.

Original entry on oeis.org

2, 6, 18, 56, 170, 522, 1594, 4880, 14922, 45654, 139642, 427176, 1306690, 3997146, 12227058, 37402144, 114411538, 349980390, 1070575586, 3274847512, 10017625050, 30643508586, 93737246762, 286738430256, 877121205338, 2683078129590, 8207426973258
Offset: 0

Views

Author

Clark Kimberling, Aug 25 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2),...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A291219 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    z = 60; s = x/(1 - x^2); p = 1 - 2 s - 2 s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000035 *)
    u = Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291228 *)
    u/2         (* A291257 *)
    LinearRecurrence[{2,4,-2,-1},{2,6,18,56},30] (* Harvey P. Dale, Aug 08 2019 *)

Formula

G.f.: -((2 (-1 - x + x^2))/(1 - 2 x - 4 x^2 + 2 x^3 + x^4)).
a(n) = 2*a(n-1) + 4*a(n-2) - 2*a(n-3) - a(n-4) for n >= 5.
a(n) = 2*A291257(n) for n >= 0.

A291232 p-INVERT of (0,1,0,1,0,1,...), where p(S) = (1 - 3 S)^2.

Original entry on oeis.org

6, 27, 114, 459, 1788, 6804, 25440, 93825, 342258, 1237329, 4439778, 15829992, 56135274, 198125703, 696387570, 2438803863, 8513220696, 29631246012, 102865720452, 356257472589, 1231184095602, 4246476696765, 14620160955390, 50252266808784, 172462429888782
Offset: 0

Views

Author

Clark Kimberling, Aug 26 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A291219 for a guide to related sequences.

Crossrefs

Programs

  • Magma
    I:=[6,27,114,459]; [n le 4 select I[n] else 6*Self(n-1)-7*Self(n-2)-6*Self(n-3)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Aug 28 2017
  • Mathematica
    z = 60; s = x/(1 - x^2); p = (1 - 3 s)^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000035 *)
    u = Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291232 *)
    u/3   (* A291265 *)
    LinearRecurrence[{6, -7, -6, -1}, {6, 27, 114, 459}, 25] (* Vincenzo Librandi, Aug 28 2017 *)
  • PARI
    Vec(3*(2 + x)*(1 - 2*x) / (1 - 3*x - x^2)^2 + O(x^30)) \\ Colin Barker, Aug 26 2017
    

Formula

G.f.: -((3 (-2 + 3 x + 2 x^2))/(-1 + 3 x + x^2)^2).
a(n) = 6*a(n-1) - 7*a(n-2) -6*a(n-3) - a(n-4) for n >= 5.
a(n) = 3 * (((3-sqrt(13))/2)^n*(-3+sqrt(13))*(-39+17*sqrt(13)-39*n) + 2^(-n)*(3+sqrt(13))^(1+n)*(39+17*sqrt(13)+39*n)) / 338. - Colin Barker, Aug 26 2017

A291217 p-INVERT of (0,1,0,1,0,1,...), where p(S) = 1 - S^3.

Original entry on oeis.org

0, 0, 1, 0, 3, 1, 6, 6, 11, 21, 24, 57, 66, 138, 194, 330, 546, 827, 1452, 2175, 3739, 5826, 9582, 15519, 24807, 40836, 64933, 106584, 170796, 277696, 448980, 724968, 1177181, 1897380, 3080367, 4972113, 8055918, 13029534, 21075947, 34125561, 55169988
Offset: 0

Views

Author

Clark Kimberling, Aug 24 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A291219 for a guide to related sequences.

Crossrefs

Programs

  • Magma
    I:=[0,0,1,0,3,1]; [n le 6 select I[n] else 3*Self(n-2)+Self(n-3)-3*Self(n-4)+Self(n-6): n in [1..45]]; // Vincenzo Librandi, Aug 25 2017
  • Mathematica
    z = 60; s = x/(1 - x^2); p = 1 - s^3;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000035 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291217 *)
    LinearRecurrence[{0, 3, 1, -3, 0, 1}, {0, 0, 1, 0, 3, 1}, 50] (* Vincenzo Librandi, Aug 25 2017 *)

Formula

G.f.: -(x^2/((-1 + x + x^2) (1 + x - x^2 - x^3 + x^4))).
a(n) = 3*a(n-2) + a(n-3) - 3*a(n-4) + a(n-6) for n >= 7.
Showing 1-10 of 48 results. Next