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 10 results.

A301674 Coordination sequence for node of type V1 in "krs" 2-D tiling (or net).

Original entry on oeis.org

1, 4, 8, 14, 16, 26, 22, 34, 36, 38, 44, 54, 46, 62, 64, 62, 72, 82, 70, 90, 92, 86, 100, 110, 94, 118, 120, 110, 128, 138, 118, 146, 148, 134, 156, 166, 142, 174, 176, 158, 184, 194, 166, 202, 204, 182, 212, 222, 190, 230, 232, 206, 240, 250, 214, 258, 260
Offset: 0

Views

Author

N. J. A. Sloane, Mar 25 2018

Keywords

Comments

Linear recurrence and g.f. confirmed by Shutov/Maleev link. - Ray Chandler, Aug 31 2023

References

  • Branko Grünbaum and G. C. Shephard, Tilings and Patterns. W. H. Freeman, New York, 1987. See Table 2.2.1, page 67, bottom row, 2nd tiling.

Crossrefs

Cf. A301676.
Coordination sequences for the 20 2-uniform tilings in the order in which they appear in the Galebach catalog, together with their names in the RCSR database (two sequences per tiling): #1 krt A265035, A265036; #2 cph A301287, A301289; #3 krm A301291, A301293; #4 krl A301298, A298024; #5 krq A301299, A301301; #6 krs A301674, A301676; #7 krr A301670, A301672; #8 krk A301291, A301293; #9 krn A301678, A301680; #10 krg A301682, A301684; #11 bew A008574, A296910; #12 krh A301686, A301688; #13 krf A301690, A301692; #14 krd A301694, A219529; #15 krc A301708, A301710; #16 usm A301712, A301714; #17 krj A219529, A301697; #18 kre A301716, A301718; #19 krb A301720, A301722; #20 kra A301724, A301726.

Programs

  • Mathematica
    LinearRecurrence[{-1,0,2,2,0,-1,-1},{1,4,8,14,16,26,22,34,36},100] (* Paolo Xausa, Nov 15 2023 *)
  • PARI
    See Links section.

Formula

(a) G.f. = -(2*x^8-x^7-5*x^6-18*x^5-20*x^4-20*x^3-12*x^2-5*x-1)/((x+1)*(x-1)^2*(x^2+x+1)^2). (b) Satisfies the recurrence {( - 2*n^5 - 13*n^4 - 22*n^3 + 7*n^2 + 30*n)*a(n) + ( - 2*n^5 - 13*n^4 - 25*n^3 + n^2 + 39*n)*a(n + 1) + ( - 6*n^2 + 6*n)*a(n + 2) + (2*n^5 + 7*n^4 + 7*n^3 - 7*n^2 - 9*n)*a(n + 3) + (2*n^5 + 7*n^4 + 4*n^3 - 7*n^2 - 6*n)*a(n + 4) = 0, a(0) = 1, a(1) = 4, a(2) = 8, a(3) = 14, a(4) = 16, a(5) = 26}. - N. J. A. Sloane, Mar 28 2018
Equivalent conjecture: 9*a(n) = 40*n -18*(-1)^n -6*(-1)^n*A076118(n+1) +6*A049347(n) -4*A049347(n-1). - R. J. Mathar, Apr 01 2018

Extensions

More terms from Rémy Sigrist, Mar 28 2018

A099254 Self-convolution of A010892. The g.f. is 1/(Alexander polynomial of granny knot).

Original entry on oeis.org

1, 2, 1, -2, -4, -2, 3, 6, 3, -4, -8, -4, 5, 10, 5, -6, -12, -6, 7, 14, 7, -8, -16, -8, 9, 18, 9, -10, -20, -10, 11, 22, 11, -12, -24, -12, 13, 26, 13, -14, -28, -14, 15, 30, 15, -16, -32, -16, 17, 34, 17, -18, -36, -18, 19, 38, 19, -20, -40, -20, 21, 42, 21
Offset: 0

Views

Author

Paul Barry, Oct 08 2004

Keywords

Comments

A granny knot sequence.
INVERTi transform of A077855: (1, 3, 6, 11, 20, 36, 64, 133, ...). - Gary W. Adamson, Jan 13 2017

Crossrefs

Row sums of array A128502.
Cf. A077855, A076118 (first differences).

Programs

  • Maple
    A099254 := proc(n)
        option remember ;
        if n <= 3 then
            op(n+1,[1,2,1,-2]) ;
        else
            2*procname(n-1)-3*procname(n-2)+2*procname(n-3)-procname(n-4) ;
        end if;
    end proc:
    seq(A099254(n),n=0..80) ; # R. J. Mathar, Jul 08 2022
  • Mathematica
    LinearRecurrence[{2, -3, 2, -1}, {1, 2, 1, -2}, 100] (* Jean-François Alcover, Sep 21 2022 *)
  • Python
    a0,a1,a2,a3,n = -2,1,2,1,3
    print(0,a3)
    print(1,a2)
    print(2,a1)
    print(3,a0)
    while n < 20000:
        a0,a1,a2,a3,n = 2*a0-3*a1+2*a2-a3,a0,a1,a2,n+1
        print(n,a0) # A.H.M. Smeets, Sep 13 2018
    
  • Python
    def A099254(n):
        a, b = divmod(n,3)
        return (1+(b&1))*(-a-1 if a&1 else a+1) # Chai Wah Wu, Jan 31 2023

Formula

G.f.: 1/(1 - 2*x + 3*x^2 - 2*x^3 + x^4) = 1/(1 - x + x^2)^2.
a(n) = 4*sqrt(3)*sin(Pi*n/3 + Pi/3)/9 + 2*(n + 1)*sin(Pi*n/3 + Pi/6)/3.
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*(n-k+1)*(-1)^k. - Paul Barry, Nov 12 2004
a(n) = 2*cos(2*Pi*(n + 2)/3)*(floor(n/3) + 1)*(-1)^(n+1). - Tani Akinari, Jul 01 2013
a(n) = (1/54)*(18*(n + 2)*(-1)^floor(n/3) + (3*n + 11)*(-1)^floor((n + 1)/3) - 9*(n + 1)*(-1)^floor((n + 2)/3) - 2*(3*n + 8)*(-1)^floor((n + 4)/3)). - John M. Campbell, Dec 23 2016
From A.H.M. Smeets, Sep 13 2018: (Start)
a(n) = 2*a(n-1) - 3*a(n-2) + 2*a(n-3) - a(n-4) for n >= 4.
a(3*k) = a(3*k+2) = (-1)^k*(k + 1) for k >= 0.
a(3*k+1) = -(-1)^k*2*(k + 1) for k >= 0. (End)
Sum_{n>=0} 1/a(n) = 5*log(2)/2. - Amiram Eldar, May 10 2025

A050531 Number of multigraphs with loops on 3 nodes with n edges.

Original entry on oeis.org

1, 2, 6, 14, 28, 52, 93, 152, 242, 370, 546, 784, 1103, 1512, 2040, 2706, 3534, 4554, 5803, 7304, 9108, 11252, 13780, 16744, 20205, 24206, 28826, 34126, 40176, 47056, 54857, 63648, 73542, 84630, 97014, 110808, 126139, 143108, 161868, 182546, 205282
Offset: 0

Views

Author

Vladeta Jovovic, Dec 29 1999

Keywords

Comments

a(n) is also the number of multigraphs (no loops allowed) on 3 nodes with n edges of two colors. - Geoffrey Critzer, Aug 10 2015

Crossrefs

Column k=3 of A290428.

Programs

  • Maple
    a076118:= gfun:-rectoproc({a(n+4) = 2*a(n+3)-3*a(n+2)+2*a(n+1)-a(n), a(0)=0,a(1)=1,a(2)=1,a(3)=-1}, a(n), remember):
    f:= n -> ceil((-1)^n*a076118(n+1)/9+(-1)^n*n/32+(4009/4320)*n+(1/2)*n^2+(5/36)*n^3+(1/48)*n^4+(1/720)*n^5):
    map(f, [$0..100]); # Robert Israel, Aug 07 2015
  • Mathematica
    < 1/(1 - x^i), {i, 1, n^2 - n}], {x, 0, nn}], x] (* Geoffrey Critzer, Aug 07 2015 *)
    CoefficientList[Series[(x^6 + x^4 + 2 x^3 + x^2 + 1)/((x^3 - 1)^2 (x^2 - 1)^2 (x - 1)^2), {x, 0, 45}], x] (* Vincenzo Librandi, Aug 08 2015 *)
  • PARI
    Vec((x^6+x^4+2*x^3+x^2+1)/((x^3-1)^2*(x^2-1)^2*(x-1)^2) + O(x^40)) \\ Colin Barker, Jul 07 2019

Formula

G.f.: (x^6+x^4+2*x^3+x^2+1)/((x^3-1)^2*(x^2-1)^2*(x-1)^2).
a(n) = ceiling((-1)^n*A076118(n+1)/9+(-1)^n*n/32+(4009/4320)*n+(1/2)*n^2+(5/36)*n^3+(1/48)*n^4+(1/720)*n^5). - Robert Israel, Aug 07 2015
a(n) = (A+B+C)/6 where A = binomial(n+5,5); B = (n+2)*(n+3)*(n+4)/8 if n even, B = (n+1)*(n+3)*(n+5)/8 if n odd; C = 2*((n/3) + 1) if n divisible by 3, C = 0 if n not divisible by 3. - David Pasino, Jul 06 2019
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) - 3*a(n-4) + 6*a(n-6) - 3*a(n-8) - 2*a(n-9) + a(n-10) + 2*a(n-11) - a(n-12) for n>11. - Colin Barker, Jul 07 2019

A098493 Triangle T(n,k) read by rows: difference between A098489 and A098490 at triangular rows.

Original entry on oeis.org

1, 0, -1, -1, -1, 1, -1, 1, 2, -1, 0, 3, 0, -3, 1, 1, 2, -5, -2, 4, -1, 1, -2, -7, 6, 5, -5, 1, 0, -5, 0, 15, -5, -9, 6, -1, -1, -3, 12, 9, -25, 1, 14, -7, 1, -1, 3, 15, -18, -29, 35, 7, -20, 8, -1, 0, 7, 0, -42, 14, 63, -42, -20, 27, -9, 1, 1, 4, -22, -24, 85, 14, -112, 42
Offset: 0

Views

Author

Ralf Stephan, Sep 12 2004

Keywords

Comments

Also, coefficients of polynomials that have values in A098495 and A094954.

Examples

			Triangle begins:
   1;
   0, -1;
  -1, -1, 1;
  -1,  1, 2, -1;
   0,  3, 0, -3, 1;
  ...
		

Crossrefs

Columns include A010892, -A076118. Diagonals include A033999, A038608, (-1)^n*A000096. Row sums are in A057077.
Cf. A098494 (diagonal polynomials), A085478, A244419.

Programs

  • Maple
    A098493 := proc (n, k)
    add((-1)^(k+binomial(n-j+1,2))*binomial(floor((1/2)*n+(1/2)*j),j)* binomial(j,k), j = k..n);
    end proc:
    seq(seq(A098493(n, k), k = 0..n), n = 0..10); # Peter Bala, Jul 13 2021
  • PARI
    T(n,k)=if(k>n||k<0||n<0,0,if(k>=n-1,(-1)^n*if(k==n,1,-k),if(n==1,0,if(k==0,T(n-1,0)-T(n-2,0),T(n-1,k)-T(n-2,k)-T(n-1,k-1)))))

Formula

T(n, k) = A098489[n(n+1)/2, k] - A098490[n(n+1)/2, k].
Recurrence: T(n, k) = T(n-1, k)-T(n-1, k-1)-T(n-2, k); T(n, k)=0 for n<0, k>n, k<0; T(n, n)=(-1)^n; T(n, n-1)=(-1)^n*(1-n).
G.f.: (1-x)/(1+(y-1)*x+x^2). [Vladeta Jovovic, Dec 14 2009]
From Peter Bala, Jul 13 2021: (Start)
Riordan array ( (1 - x)/(1 - x + x^2), -x/(1 - x + x^2) ).
T(n,k) = (-1)^k * the (n,k)-th entry of Q^(-1)*P = Sum_{j = k..n} (-1)^(k+binomial(n-j+1,2))*binomial(floor((1/2)*n+(1/2)*j),j)* binomial(j,k), where P denotes Pascal's triangle A007318 and Q denotes triangle A061554 (formed from P by sorting the rows into descending order). (End)
From Peter Bala, Jun 26 2025: (Start)
n-th row polynomial R(n, x) = Sum_{k = 0..n} (-1)^k * binomial(n+k, 2*k) * (1 + x)^k.
R(n, 2*x + 1) = (-1)^n * Dir(n, x), where Dir(n,x) denotes the n-th row polynomial of the triangle A244419.
R(n, -1 - x) = b(n, x), where b(n, x) denotes the n-th row polynomial of the triangle A085478. (End)

A166711 Permutation of the integers: two positives, one negative.

Original entry on oeis.org

0, 1, 2, -1, 3, 4, -2, 5, 6, -3, 7, 8, -4, 9, 10, -5, 11, 12, -6, 13, 14, -7, 15, 16, -8, 17, 18, -9, 19, 20, -10, 21, 22, -11, 23, 24, -12, 25, 26, -13, 27, 28, -14, 29, 30, -15, 31, 32, -16, 33, 34, -17, 35, 36, -18, 37, 38, -19, 39, 40, -20, 41, 42, -21, 43, 44, -22, 45, 46
Offset: 0

Views

Author

Jaume Oliver Lafont, Oct 18 2009

Keywords

Comments

Setting m=2 in
log(m) = Sum_{n>0} (n mod m - (n-1) mod m)/n [1]
yields the sum
log(2) = (1 -1/2) +(1/3 -1/4) +(1/5 -1/6)+...
Substituting every -1/d by 1/d - 2/d we obtain
log(2) = (1+1/2-1)+(1/3+1/4-1/2)+(1/5+1/6-1/3)+...
a(n) is the sequence of denominators of this modified sum with unit numerators, so
Sum_{k>0} 1/a(k) = log(2)
Substituting -1/d by -2/d + 1/d would yield another permutation (one positive, one negative, one positive) with the same sum of inverses.
Similar sequences (m positives, one negative) may be obtained for the logarithm of any integer m>0. A001057 is the case m=1, with sum of inverses log(1).
Equation [1] is a result of expanding log( Sum_{0<=k<=m-1} x^k ) at x=1 (see comment to A061347.)

Crossrefs

Cf. A001057, A002162, A038608. Signed and shifted version of A009947.

Programs

  • Mathematica
    LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 1, 2, -1, 3, 4}, 100] (* G. C. Greubel, May 24 2016 *)
    Join[{0},With[{nn=50},Riffle[Range[nn],Range[-1,-nn/2,-1],3]]] (* Harvey P. Dale, May 15 2023 *)
  • PARI
    a(n)=(2*(n+1)\3)*(1-3/2*!(n%3))
    
  • PARI
    a(n)=if(n>=0,[ -n\3, 2*(n\3)+1, 2*(n\3)+2][n%3+1]) \\ Jaume Oliver Lafont, Nov 14 2009

Formula

G.f.: (x*(1+2*x-x^2+x^3)/((1-x)^2*(1+x+x^2)^2)).
a(0)=0, a(1)=1, a(2)=2, a(3)=-1, a(4)=3, a(5)=4, a(n)=2*a(n-3)-a(n-6), n>=6.
a(n) = (n+1)/3 +2*A049347(n)/3 -(-1)^n*A076118(n+1). - R. J. Mathar, Oct 30 2009

Extensions

Corrected by Jaume Oliver Lafont, Oct 22 2009
frac keyword removed by Jaume Oliver Lafont, Nov 02 2009

A028289 Expansion of (1+x^2+x^3+x^5)/((1-x)(1-x^3)(1-x^4)(1-x^6)).

Original entry on oeis.org

1, 1, 2, 4, 5, 7, 11, 13, 17, 23, 27, 33, 42, 48, 57, 69, 78, 90, 106, 118, 134, 154, 170, 190, 215, 235, 260, 290, 315, 345, 381, 411, 447, 489, 525, 567, 616, 658, 707, 763, 812, 868, 932, 988, 1052, 1124, 1188
Offset: 0

Views

Author

Keywords

Programs

  • Maple
    A117373 := proc(n) op(1+(n mod 6),[1,-2,-3,-1,2,3]) ; end proc:
    A076118 := proc(n) coeftayl( x*(1-x)/(1-x+x^2)^2,x=0,n) ; end proc:
    A028289 := proc(n) 1/108*n^3 +1/8*n^2 +55/108*n +29/48 +1/16*(-1)^n -2*(-1)^n*A117373(n+2)/27 +(-1)^n*A076118(n+1)/9; end proc:
    seq(A028289(n),n=0..20) ; # R. J. Mathar, Mar 22 2011
  • Mathematica
    CoefficientList[Series[(1+x^2+x^3+x^5)/((1-x)(1-x^3)(1-x^4) (1-x^6)),{x,0,50}],x]  (* Harvey P. Dale, Apr 20 2011 *)
  • PARI
    Vec((1+x^2+x^3+x^5)/((1-x)*(1-x^3)*(1-x^4)*(1-x^6))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012

Formula

G.f.: 1 / ( (1+x)*(1+x+x^2)^2*(x-1)^4 ). - R. J. Mathar, Mar 22 2011

A122765 Triangle read by rows: Let p(k, x) = x*p(k-1, x) - p(k-2, x). Then T(k,x) = dp(k,x)/dx.

Original entry on oeis.org

1, -1, 2, -2, -2, 3, 2, -6, -3, 4, 3, 6, -12, -4, 5, -3, 12, 12, -20, -5, 6, -4, -12, 30, 20, -30, -6, 7, 4, -20, -30, 60, 30, -42, -7, 8, 5, 20, -60, -60, 105, 42, -56, -8, 9, -5, 30, 60, -140, -105, 168, 56, -72, -9, 10
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 22 2006

Keywords

Comments

Based on the coefficients of derivatives of the polynomials in A130777.

Examples

			Triangle begins as:
   1;
  -1,   2;
  -2,  -2,   3;
   2,  -6,  -3,   4;
   3,   6, -12,  -4,   5;
  -3,  12,  12, -20,  -5,   6;
  -4, -12,  30,  20, -30,  -6,   7;
   4, -20, -30,  60,  30, -42,  -7,   8;
   5,  20, -60, -60, 105,  42, -56,  -8,  9;
		

Crossrefs

Programs

  • Magma
    A122765:= func< n,k | k*(-1)^Binomial(n-k+1, 2)*Binomial(Floor((n+k)/2), k) >;
    [A122765(n,k): k in [1..n], n in [1..14]]; // G. C. Greubel, Dec 30 2022
    
  • Mathematica
    (* First program *)
    p[0,x]=1; p[1,x]=x-1; p[k_,x_]:= p[k, x]= x*p[k-1,x] -p[k-2,x]; a = Table[Expand[p[n, x]], {n, 0, 10}]; Table[CoefficientList[D[a[[n]], x], x], {n, 2, 10}]//Flatten
    (* Second program *)
    T[n_, k_]:= k*(-1)^Binomial[n-k+1,2]*Binomial[Floor[(n+k)/2], k];
    Table[T[n, k], {n,14}, {k,n}]//Flatten (* G. C. Greubel, Dec 30 2022 *)
  • PARI
    tpol(n) = if (n<=0, 1, if (n==1, x-1, x*tpol(n-1) -tpol(n-2)));
    lista(nn) = {for(n=0, nn, pol = deriv(tpol(n)); for (k=0, poldegree(pol), print1(polcoeff(pol, k), ", ");););} \\ Michel Marcus, Feb 07 2014
    
  • SageMath
    def A122765(n, k): return k*(-1)^binomial(n-k+1, 2)*binomial(((n+k)//2), k)
    flatten( [[A122765(n,k) for k in range(1,n+1)] for n in range(1,15)] ) # G. C. Greubel, Dec 30 2022

Formula

From G. C. Greubel, Dec 30 2022: (Start)
T(n, k) = coefficient [x^k]( p(n, x) ), where p(n,x) = (2/(x^2-4))*((n+1)*chebyshev_T(n+1,x/2) -n*chebyshev_T(n,x/2) - (x/2)*(chebyshev_U(n,x/2) - chebyshev_U(n-1,x/2))).
T(n, k) = k*(-1)^binomial(n-k+1, 2)*binomial(floor((n+k)/2), k).
T(n, n) = n.
T(n, n-1) = -(n-1).
T(n, n-2) = -2*A000217(n-2).
T(n, n-3) = 2*A000217(n-3).
T(n, 1) = (-1)^binomial(n, 2)*floor((n+1)/2).
T(n, 2) = 2*(-1)^binomial(n-1, 2)*binomial(floor((n+2)/2), 2).
Sum_{k=1..n} T(n, k) = A076118(n).
Sum_{k=1..n} (-1)^k*T(n, k) = (-1)^(n-1)*A165202(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = [n=1] - [n=2].
Sum_{k=1..floor((n+1)/2)} (-1)^k*T(n-k+1, k) = (-1)^binomial(n+1, 2)*b(n), where b(n) = 4^floor(n/4)*A026741(n/2) if n is even and b(n) = 4^floor((n-1)/4)*A026741((n-1)/4) if n is odd. (End)

Extensions

Name corrected and more terms from Michel Marcus, Feb 07 2014

A151842 a(3n) = n, a(3n+1) = 2n+1, a(3n+2) = n+1.

Original entry on oeis.org

0, 1, 1, 1, 3, 2, 2, 5, 3, 3, 7, 4, 4, 9, 5, 5, 11, 6, 6, 13, 7, 7, 15, 8, 8, 17, 9, 9, 19, 10, 10, 21, 11, 11, 23, 12, 12, 25, 13, 13, 27, 14, 14, 29, 15, 15, 31, 16, 16, 33, 17, 17, 35, 18, 18, 37, 19, 19, 39, 20, 20, 41, 21, 21, 43, 22, 22, 45, 23, 23, 47
Offset: 0

Views

Author

Shane Geiger (shane.geiger(AT)gmail.com), Jul 14 2009

Keywords

Comments

Take a list of numbers (like 0,1,2,3,4,5,...) and then pair them up like this: (0,1)(1,2),(2,3),(3,4)... Then sum each pair, and insert the sum between the numbers, like this: (0,1,1), (1,3,2), (2,5,3), ... Finally, remove the parentheses: 0,1,1,1,3,2,2,5,3,...
This mirrors the pattern used to make a dragon curve fractal. You take two points, then find one to insert between them. In the next iteration, you take those three points and find two numbers to insert between them. (Rather than summing the two numbers, a different function is used to find a point relative to two other points.)
a(n) is the number of rises in all compositions of n + 2 with parts in {1,2} and adjacent differences in {-1,1}. - John Tyler Rascoe, Apr 29 2025

Examples

			G.f. = x + x^2 + x^3 + 3*x^4 + 2*x^5 + 2*x^6 + 5*x^7 + 3*x^8 + 3*x^9 + ... - _Michael Somos_, Aug 12 2009
		

Crossrefs

See A076118 for a version with signs.

Programs

  • Magma
    I:=[0,1,1,1,3,2]; [n le 6 select I[n] else 2*Self(n-3)-Self(n-6): n in [1..80]]; // Vincenzo Librandi, Feb 14 2015
  • Mathematica
    CoefficientList[Series[x (1 + x) (1 + x^2) / ((x - 1)^2 (1 + x + x^2)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Feb 14 2015 *)
  • PARI
    {a(n) = kronecker(9, n) + (n\3) * [1, 2, 1][n%3 + 1]} /* Michael Somos, Aug 12 2009 */
    
  • Python
    def pairup(x): return [x[i:i+2] for i in range(len(x)-1)]
    def combine(vals): return sum(vals)
    def expand(L,fn): return [(x[0],fn(x),x[1]) for x in pairup(L)]
    L = list(range(20))
    print(expand(L,combine))
    

Formula

From R. J. Mathar, Jul 14 2009: (Start)
G.f.: x*(1+x)*(1+x^2)/((x-1)^2*(1+x+x^2)^2).
a(n) = 2*a(n-3) - a(n-6). (End)
From Michael Somos, Aug 12 2009: (Start)
G.f.: x * (1 - x^4) / ((1 - x) * (1 - x^3)^2).
Euler transform of length 4 sequence [ 1, 0, 2, -1]. (End)
-a(n) = a(-1-n). - Michael Somos, Nov 11 2013
From Ridouane Oudra, Nov 23 2024: (Start)
a(n) = 5*n/6 + n^2/2 - n^3/3 + (2*n^2 - n - 3/2)*floor(n/3) - (3*n + 3/2)*floor(n/3)^2.
a(n) = t(n+2)*t(n+3) - t(n)*t(n+1), where t(n) = floor(n/3) = A002264(n).
a(n) = A008133(n+2) - A008133(n). (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 (A003881). - Amiram Eldar, May 10 2025

Extensions

More terms from Vincenzo Librandi, Feb 14 2015

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

Original entry on oeis.org

0, 1, 2, 0, -5, -7, 0, 12, 15, 0, -22, -26, 0, 35, 40, 0, -51, -57, 0, 70, 77, 0, -92, -100, 0, 117, 126, 0, -145, -155, 0, 176, 187, 0, -210, -222, 0, 247, 260, 0, -287, -301, 0, 330, 345, 0, -376, -392, 0, 425, 442, 0, -477, -495
Offset: 0

Views

Author

Paul Barry, Mar 14 2005

Keywords

Comments

Image of C(n+1,2) under the Riordan array (1, x*(1-x)).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 60); [0] cat Coefficients(R!( x*(1-x)/(1-x+x^2)^3 )); // G. C. Greubel, Jan 01 2023
    
  • Maple
    S:=(j,n)->sum(k^j,k=1..n):seq((S(5,n+1)mod S(3,n+1))/((n+1)*(n+2))*(-1)^floor((n mod 6)/4), n=1..40). # Gary Detlefs, Oct 31 2011
  • Mathematica
    CoefficientList[Series[x*(1-x)/(1-x+x^2)^3, {x,0,60}], x]  (* Harvey P. Dale, Apr 13 2011 *)
  • Sage
    def A104555_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1-x)/(1-x+x^2)^3 ).list()
    A104555_list(60) # G. C. Greubel, Jan 01 2023

Formula

a(n) = 3*a(n-1) - 6*a(n-2) + 7*a(n-3) - 6*a(n-4) + 3*a(n-5) - a(n-6).
a(n) = Sum_{k=0..n} binomial(k, n-k)(-1)^(n-k)*k(k+1)/2.
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)(-1)^k*(n-k)(n-k+1)/2.
a(3*n) = 0, a(3*n-2) = n*(3*n - 1)/2, a(3*n-1) = n*(3*n + 1)/2. - Ralf Stephan, May 20 2007
a(n) = ((Sum_{k=1..n+1} k^5) mod (Sum_{k=1..n+1} k^3))/((n+1)*(n+2))*(-1)^floor((n mod 6)/4). - Gary Detlefs, Oct 31 2011

A383549 Number of rises in all compositions of n with parts in {1,2,3} and adjacent differences in {-1,1}.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 5, 3, 9, 11, 10, 24, 21, 30, 50, 43, 75, 93, 96, 161, 170, 215, 312, 323, 456, 574, 639, 906, 1046, 1276, 1710, 1935, 2501, 3135, 3642, 4760, 5699, 6893, 8823, 10401, 12952, 16079, 19104, 24002, 29097, 35165, 43865, 52628, 64503, 79363, 95329
Offset: 0

Views

Author

John Tyler Rascoe, Apr 29 2025

Keywords

Comments

A rise is any pair of parts (p_{i-1},p_i) with p_{i-1} < p_i.
By reversal a(n) is also the number of descents in all compositions of n of this kind.

Examples

			For n = 6 the following compositions have 5 rises: (1,2,1,2), (1,2,3), (2,1,2,1), (3,2,1).
		

Crossrefs

Programs

  • PARI
    A_x(N) = {my(x='x+O('x^N)); concat([0,0,0], Vec(x^3*(1 + x^2)^2*(1 + x + x^3)/(1 - x^3 - x^5)^2))}
    A_x(40)

Formula

G.f.: x^3*(1 + x^2)^2*(1 + x + x^3)/(1 - x^3 - x^5)^2.
Showing 1-10 of 10 results.