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.

Previous Showing 41-50 of 71 results. Next

A058395 Square array read by antidiagonals. Based on triangular numbers (A000217) with each term being the sum of 2 consecutive terms in the previous row.

Original entry on oeis.org

1, 0, 1, 3, 1, 1, 0, 3, 2, 1, 6, 3, 4, 3, 1, 0, 6, 6, 6, 4, 1, 10, 6, 9, 10, 9, 5, 1, 0, 10, 12, 15, 16, 13, 6, 1, 15, 10, 16, 21, 25, 25, 18, 7, 1, 0, 15, 20, 28, 36, 41, 38, 24, 8, 1, 21, 15, 25, 36, 49, 61, 66, 56, 31, 9, 1, 0, 21, 30, 45, 64, 85, 102, 104, 80, 39, 10, 1, 28, 21, 36, 55, 81, 113, 146, 168, 160, 111, 48, 11, 1
Offset: 0

Views

Author

Henry Bottomley, Nov 24 2000

Keywords

Comments

Changing the formula by replacing T(2n, 0) = T(n, 3) with T(2n, 0) = T(n, m) for some other value of m would change the generating function to the coefficient of x^n in expansion of (1 + x)^k / (1 - x^2)^m. This would produce A058393, A058394, A057884 (and effectively A007318).

Examples

			The array T(n, k) starts:
[0] 1, 0,  3,   0,   6,   0,  10,    0,   15,    0, ...
[1] 1, 1,  3,   3,   6,   6,  10,   10,   15,   15, ...
[2] 1, 2,  4,   6,   9,  12,  16,   20,   25,   30, ...
[3] 1, 3,  6,  10,  15,  21,  28,   36,   45,   55, ...
[4] 1, 4,  9,  16,  25,  36,  49,   64,   81,  100, ...
[5] 1, 5, 13,  25,  41,  61,  85,  113,  145,  181, ...
[6] 1, 6, 18,  38,  66, 102, 146,  198,  258,  326, ...
[7] 1, 7, 24,  56, 104, 168, 248,  344,  456,  584, ...
[8] 1, 8, 31,  80, 160, 272, 416,  592,  800, 1040, ...
[9] 1, 9, 39, 111, 240, 432, 688, 1008, 1392, 1840, ...
		

Crossrefs

Rows are A000217 with zeros, A008805, A002620, A000217, A000290, A001844, A005899.
Columns are A000012, A001477, A016028.
The triangle A055252 also appears in half of the array.

Programs

  • Maple
    gf := n -> (1 + x)^n / (1 - x^2)^3: ser := n -> series(gf(n), x, 20):
    seq(lprint([n], seq(coeff(ser(n), x, k), k = 0..9)), n = 0..9); # Peter Luschny, Apr 12 2023
  • Mathematica
    T[0, k_] := If[OddQ[k], 0, (k+2)(k+4)/8];
    T[n_, k_] := T[n, k] = If[k == 0, 1, T[n-1, k-1] + T[n-1, k]];
    Table[T[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Apr 13 2023 *)

Formula

T(n, k) = T(n-1, k-1) + T(n, k-1) with T(0, k) = 1, T(2*n, 0) = T(n, 3) and T(2*n + 1, 0) = 0. Coefficient of x^n in expansion of (1 + x)^k / (1 - x^2)^3.

A189980 a(n) is the number of incongruent two-color bracelets of n beads, 10 from them are black (A005515), having a diameter of symmetry.

Original entry on oeis.org

1, 1, 6, 6, 21, 21, 56, 56, 126, 126, 252, 252, 462, 462, 792, 792, 1287, 1287, 2002, 2002, 3003, 3003, 4368, 4368, 6188, 6188, 8568, 8568, 11628, 11628, 15504, 15504, 20349, 20349, 26334, 26334, 33649, 33649
Offset: 10

Views

Author

Vladimir Shevelev, May 03 2011

Keywords

Comments

For n >= 11, a(n-1) is the number of incongruent two-color bracelets of n beads, 11 from them are black (A032282), having a diameter of symmetry.

Crossrefs

Programs

Formula

a(n) = binomial(floor(n/2), 5). [Typo fixed by Colin Barker, Feb 07 2013]
a(n+6) = A194005(n, n-5). - Johannes W. Meijer, Aug 15 2011
G.f.: x^10/((x-1)^6*(x+1)^5). - Colin Barker, Feb 07 2013

Extensions

Data added and link corrected by Johannes W. Meijer, Aug 15 2011

A242279 Number of inequivalent (mod D_4) ways four checkers can be placed on an n X n board.

Original entry on oeis.org

1, 23, 252, 1666, 7509, 26865, 79920, 209096, 491425, 1064575, 2150076, 4104738, 7458437, 13005041, 21857984, 35598880, 56353185, 87019191, 131364700, 194364050, 282314901, 403316353, 567402672, 787201416, 1078078209, 1459020095, 1952782300, 2587048786, 3394568325
Offset: 2

Views

Author

Heinrich Ludwig, May 10 2014

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^2*(1 + 19*x + 161*x^2 + 697*x^3 + 1446*x^4 + 2070*x^5 + 1422*x^6 + 766*x^7 + 105*x^8 + 31*x^9 + x^10 + x^11) / ((1-x)^9 * (1+x)^5), {x, 0, 20}], x] (* Vaclav Kotesovec, May 10 2014 *)
    LinearRecurrence[{4,-1,-16,19,20,-45,0,45,-20,-19,16,1,-4,1},{0,0,1,23,252,1666,7509,26865,79920,209096,491425,1064575,2150076,4104738},40] (* Harvey P. Dale, May 06 2018 *)

Formula

a(n) = (n^8 - 6*n^6 + 40*n^4 - 48*n^3 + 16*n^2 + IF(MOD(n, 2) = 1)*(14*n^4 - 48*n^3 + 34*n^2 - 3))/192.
G.f.: x^2*(1 + 19*x + 161*x^2 + 697*x^3 + 1446*x^4 + 2070*x^5 + 1422*x^6 + 766*x^7 + 105*x^8 + 31*x^9 + x^10 + x^11) / ((1-x)^9 * (1+x)^5). - Vaclav Kotesovec, May 10 2014
a(n) = A054772(n, 4), n >= 2. - Wolfdieter Lang, Oct 03 2016

A242358 Number of inequivalent (mod D_4) ways five checkers can be placed on an n X n board.

Original entry on oeis.org

23, 567, 6814, 47358, 239511, 954226, 3207212, 9414828, 24862239, 60136329, 135311658, 286229762, 574460495, 1101240084, 2028333848, 3605765688, 6211552455, 10402472811, 16984387958, 27099325638, 42342870823, 64905898662, 97761436356, 144885584740, 211543443215
Offset: 3

Views

Author

Heinrich Ludwig, May 11 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Drop[CoefficientList[Series[x^3*(-23 - 452*x - 4071*x^2 - 16016*x^3 - 40397*x^4 - 59335*x^5 - 61954*x^6 - 38236*x^7 - 17221*x^8 - 3614*x^9 - 623*x^10 + 20*x^11 + x^12 + x^13)/((x-1)^11*(x+1)^6), {x, 0, 20}], x],3] (* Vaclav Kotesovec, May 11 2014 *)

Formula

a(n) = (n^10 - 10*n^8 + 35*n^6 + 52*n^5 - 210*n^4 + 140*n^3 - 56*n^2 + 48*n + IF(MOD(n, 2) = 1)*(52*n^5 - 145*n^4 + 140*n^3 - 80*n^2 + 48*n - 15))/960.
G.f.: x^3*(-23 - 452*x - 4071*x^2 - 16016*x^3 - 40397*x^4 - 59335*x^5 - 61954*x^6 - 38236*x^7 - 17221*x^8 - 3614*x^9 - 623*x^10 + 20*x^11 + x^12 + x^13)/((x-1)^11*(x+1)^6). - Vaclav Kotesovec, May 11 2014
a(n) = A054772(n, 5), n >=3. - Wolfdieter Lang, Oct 03 2016

A330641 a(n) is the number of partitions of n with Durfee square of size <= 3.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 230, 295, 380, 480, 607, 758, 943, 1161, 1426, 1733, 2100, 2525, 3023, 3595, 4261, 5017, 5888, 6874, 7996, 9258, 10687, 12281, 14073, 16066, 18288, 20747, 23478, 26482, 29801, 33442, 37441, 41811, 46596, 51801, 57478, 63639, 70329, 77567
Offset: 0

Views

Author

Omar E. Pol, Dec 22 2019

Keywords

Crossrefs

Programs

  • PARI
    seq(n)={Vec((1 - x - x^2 + 2*x^4 + x^5 - 2*x^6 - x^7 + x^8 + x^9 - x^11 + x^12) / ((1 - x)^6*(1 + x)^2*(1 + x + x^2)^2) + O(x*x^n))} \\ Andrew Howroyd, Dec 27 2024

Formula

a(n) = A000041(n), 0 <= n <= 15.
a(n) = A330640(n), 0 <= n <= 8.
a(n) = A330640(n) + A117485(n), n >= 9.
a(n) = n + A006918(n-3) + A117485(n), n >= 9.
From Colin Barker, Dec 31 2019: (Start)
G.f.: (1 - x - x^2 + 2*x^4 + x^5 - 2*x^6 - x^7 + x^8 + x^9 - x^11 + x^12) / ((1 - x)^6*(1 + x)^2*(1 + x + x^2)^2).
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>12. (End)

A064349 Generating function: 1/((1-x)*(1-x^2)^2*(1-x^3)^3*(1-x^4)^4).

Original entry on oeis.org

1, 1, 3, 6, 13, 19, 37, 58, 97, 143, 227, 328, 492, 688, 992, 1364, 1903, 2551, 3473, 4586, 6097, 7911, 10333, 13226, 16988, 21454, 27172, 33938, 42437, 52423, 64833, 79354, 97130, 117824, 142930, 172018, 206925, 247179, 295105, 350154, 415124
Offset: 0

Views

Author

Henry Bottomley, Sep 17 2001

Keywords

Comments

Number of partitions of n into parts 1 (of one kind), 2 (of two kinds), 3 (of three kinds), and 4 (of 4 kinds). [Joerg Arndt, Jul 11 2013]

Crossrefs

The sequence of sequences A000007, A000012, A008805, A002597, A064349, etc. approaches A000219.
Essentially the same as A002598.
Cf. A002598.

Programs

  • PARI
    a(n) = floor( ([13, 28, -44][n%3+1]+(9/2)*(n\3+2)*((n+1)%3-1)) * (n\3+1)/729 - (n\2+1)*(-1)^(n\2) * (3*[-8, 11]+(n\2+2)*(2*[-1, 3]+(n\2+3)*(1/3)*[0, 1]))[n%2+1]/512 + (2*n^9 +270*n^8 +15600*n^7 +504000*n^6 +9977730*n^5 +124629750*n^4 +973069200*n^3 +4521339000*n^2 +11137512613*n +16461579435 +5103*(n+15)*(2*n^4 +120*n^3 +2440*n^2 +19200*n +48213)*(-1)^n) / 20065812480 ) \\ Tani Akinari, Jul 12 2013
    
  • PARI
    Vec(1/((1-x)*(1-x^2)^2*(1-x^3)^3*(1-x^4)^4)+O(x^66)) \\ Joerg Arndt, Jul 11 2013

A157898 Triangle read by rows: inverse binomial transform of A059576.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 0, 2, 2, 4, 1, 2, 6, 4, 8, 0, 3, 6, 16, 8, 16, 1, 3, 12, 16, 40, 16, 32, 0, 4, 12, 40, 40, 96, 32, 64, 1, 4, 20, 40, 120, 96, 224, 64, 128, 0, 5, 20, 80, 120, 336, 224, 512, 128, 256
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Mar 08 2009

Keywords

Comments

The inverse binomial transform of the triangle A059576 is given by multiplying the triangle with A130595 from the left.

Examples

			First few rows of the triangle =
  1;
  0, 1;
  1, 1,  2;
  0, 2,  2,  4;
  1, 2,  6,  4,   8;
  0, 3,  6, 16,   8,  16;
  1, 3, 12, 16,  40,  16,  32;
  0, 4, 12, 40,  40,  96,  32,  64;
  1, 4, 20, 40, 120,  96, 224,  64, 128;
  0, 5, 20, 80, 120, 336, 224, 512, 128, 256;
  ...
		

Crossrefs

Programs

  • Magma
    A011782:= func< n | n eq 0 select 1 else 2^(n-1) >;
    function t(n, k) // t = A059576
      if k eq 0 or k eq n then return A011782(n);
      else return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1);
      end if; return t;
    end function;
    A157898:= func< n,k | (&+[(-1)^(n-j)*Binomial(n,j)*t(j,k): j in [k..n]]) >;
    [A157898(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 03 2022
    
  • Maple
    A059576 := proc (n, k)
        if n = 0 then
            return 1;
        end if;
        if k <= n and k >= 0 then
            add((-1)^j*2^(n-j-1)*binomial(k, j)*binomial(n-j, k), j = 0 .. min(k, n-k))
        else
            0 ;
        end if
    end proc:
    A157898 := proc(n,k)
        add ( A130595(n,j)*A059576(j,k),j=k..n) ;
    end proc: # R. J. Mathar, Feb 13 2013
  • Mathematica
    t[n_, k_]:= t[n, k]= If[k==0 || k==n, 2^(n-1) +Boole[n==0]/2, 2*t[n-1, k-1] + 2*t[n-1, k] -(2 -Boole[n==2])*t[n-2, k-1]]; (* t= A059576 *)
    A157898[n_, k_]:= A157898[n, k]= Sum[(-1)^(n-j)*Binomial[n,j]*t[j,k], {j,k,n}];
    Table[A157898[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 03 2022 *)
  • SageMath
    @CachedFunction
    def t(n, k): # t = A059576
        if (k==0 or k==n): return bool(n==0)/2 + 2^(n-1) # A011782
        else: return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1)
    def A157898(n,k): return sum((-1)^(n-j)*binomial(n,j)*t(j,k) for j in (k..n))
    flatten([[A157898(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 03 2022

Formula

Sum_{k=0..n} T(n, k) = A097076(n+1).
From G. C. Greubel, Sep 03 2022: (Start)
T(n, k) = Sum_{j=k..n} (-1)^(n-j)*binomial(n,j)*A059576(j,k).
T(n, 0) = A059841(n).
T(n, 1) = A004526(n-1).
T(n, 2) = 2*A008805(n-2).
T(n, 3) = 4*A058187(n-3).
T(n, 4) = 8*A189976(n+4).
T(n, n) = A011782(n).
T(n, n-1) = A011782(n) - [n==0]. (End)

A211534 Number of ordered triples (w,x,y) with all terms in {1,...,n} and w = 3x + 3y.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 3, 3, 6, 6, 6, 10, 10, 10, 15, 15, 15, 21, 21, 21, 28, 28, 28, 36, 36, 36, 45, 45, 45, 55, 55, 55, 66, 66, 66, 78, 78, 78, 91, 91, 91, 105, 105, 105, 120, 120, 120, 136, 136, 136, 153, 153, 153, 171, 171, 171, 190, 190, 190, 210
Offset: 0

Views

Author

Clark Kimberling, Apr 15 2012

Keywords

Comments

This sequence consists of six 0's followed by triply repeated triangular numbers.
For a guide to related sequences, see A211422.

Crossrefs

Cf. A211422, A008805 (w = 2x + 2y and doubly repeated triangular numbers).

Programs

  • Magma
    [Floor(n/3)*(Floor(n/3)-1)/2 : n in [0..100]]; // Wesley Ivan Hurt, Apr 05 2015
    
  • Magma
    [n le 7 select Floor(n/7) else Self(n-1)+2*Self(n-3)-2*Self(n-4)-Self(n-6)+ Self(n-7): n in [1..70]]; // Vincenzo Librandi, Apr 05 2015
  • Maple
    A211534:=n->floor(n/3)*(floor(n/3)-1)/2: seq(A211534(n), n=0..100); # Wesley Ivan Hurt, Apr 05 2015
  • Mathematica
    t[n_] := t[n] = Flatten[Table[-w + 3 x + 3 y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}]  (* A211534 *)
    FindLinearRecurrence[t]
    LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {0, 0, 0, 0, 0, 0, 1}, 70] (* Vincenzo Librandi, Apr 05 2015 *)
  • PARI
    concat([0,0,0,0,0,0], Vec(-x^6/((x-1)^3*(x^2+x+1)^2) + O(x^100))) \\ Colin Barker, Feb 17 2015
    

Formula

a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7).
a(n) = floor(n/3)*( floor(n/3) - 1 )/2. - Luce ETIENNE, Jul 08 2014
G.f.: -x^6 / ((x-1)^3*(x^2+x+1)^2). - Colin Barker, Feb 17 2015
a(n) = Sum_{i=0..n-3} i*0^(i mod 3)/3. - Wesley Ivan Hurt, Apr 05 2015

A247976 Triangle read by rows: T(n,k) generated by m-gon expansions in the case of odd m with "vertex to vertex" version or even m with "vertex to side" version. (See comment for details.)

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 4, 6, 4, 1, 4, 6, 4, 1, 4, 6, 4, 1, 4, 6, 4, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 7, 21, 35, 35, 21, 7
Offset: 1

Views

Author

Kival Ngaokrajang, Sep 28 2014

Keywords

Comments

Refer to triangle expansions in A061777 and A101946 (and their companions for m-gons) which are "vertex to vertex" and "vertex to side" versions respectively. The label values at each iteration can be arranged as triangle. Any m-gon can also be arranged as the same triangle with conditions: (i) m is odd and expansion is "vertex to vertex" version or (ii) m is even and expansion is "vertex to side" version. m*Sum_{i=1..k}T(n,k) gives the total label value in n-th iteration. See illustration.

Examples

			Triangle begins:
  1;
  1,  1;
  1,  1,  2;
  1,  2,  1,  2;
  1,  2,  1,  3,  3;
  1,  3,  3,  1,  3,  3;
  1,  3,  3,  1,  4,  6,  4;
  1,  4,  6,  4,  1,  4,  6,  4;
  1,  4,  6,  4,  1,  5, 10, 10,  5;
  1,  5, 10, 10,  5,  1,  5, 10, 10, 5;
  ...
		

Crossrefs

Rows sum: A027383.
Column (start from 1s): c3=A008805, c4=A058187, c5=A000332 repeated, c6=A000389 repeated, c7=A000579 repeated.
Vertex to vertex: A061777, A247618, A247619, A247620.
Vertex to side: A101946, A247903, A247904, A247905.
Cf. A074909.

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1, 1, If[k==n, Floor[(n+1)/2], If[OddQ[n], If[k<=(n+ 1)/2, T[n-1, k], T[n-1, k-1] + T[n-1, k]], If[kG. C. Greubel, Feb 18 2022 *)
  • Sage
    @CachedFunction
    def T(n,k): # A247976
        if (k==1): return 1
        elif (k==n): return (n+1)//2
        elif (n%2==1): return T(n-1,k) if (k <= (n+1)/2) else T(n-1,k-1) + T(n-1,k)
        else: return T(n-1,k-1)+T(n-1,k) if (k < (n+2)/2) else T(n,k-n/2)
    flatten([[T(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Feb 18 2022

Formula

T(n, k) = ( T(n-1, k) if k <= (n+1)/2 otherwise T(n-1, k-1) + T(n-1, k) ) for odd n rows, ( T(n-1, k-1) + T(n-1, k) if k < (n+2)/2 otherwise T(n, k - n/2) ) for even n rows, with T(n, 1) = 1 and T(n, n) = floor((n+1)/2). - G. C. Greubel, Feb 18 2022

A317575 Irregular triangle read by rows: T(n,k) is the number of n X n tic-tac-toe positions (up to rotation and reflection) with k tokens (i.e., after k plays) which occur in a game (n > 0, 0 <= k <= n^2).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 0, 1, 3, 12, 38, 108, 174, 204, 153, 57, 15, 1, 3, 33, 219, 1413, 5514, 20122, 50215, 112379, 179510, 245690, 245690, 193318, 110452, 41870, 10489, 1059, 1, 6, 85, 904, 9664, 66859
Offset: 1

Views

Author

Álvar Ibeas, Jul 31 2018

Keywords

Examples

			Triangle begins:
  n\k |  0   1   2   3   4   5   6   7   8   9
  ----+---------------------------------------
   1  |  1   1
   2  |  1   1   2   2   0
   3  |  1   3  12  38 108 174 204 153  57  15
		

Crossrefs

Cf. A008907 (3rd row), A008805 (column k=1), A242709 (column k=2), A317573, A317574.
Previous Showing 41-50 of 71 results. Next