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 11-20 of 40 results. Next

A077042 Square array read by falling antidiagonals of central polynomial coefficients: largest coefficient in expansion of (1 + x + x^2 + ... + x^(n-1))^k = ((1-x^n)/(1-x))^k, i.e., the coefficient of x^floor(k*(n-1)/2) and of x^ceiling(k*(n-1)/2); also number of compositions of floor(k*(n+1)/2) into exactly k positive integers each no more than n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 3, 3, 1, 1, 0, 1, 6, 7, 4, 1, 1, 0, 1, 10, 19, 12, 5, 1, 1, 0, 1, 20, 51, 44, 19, 6, 1, 1, 0, 1, 35, 141, 155, 85, 27, 7, 1, 1, 0, 1, 70, 393, 580, 381, 146, 37, 8, 1, 1, 0, 1, 126, 1107, 2128, 1751, 780, 231, 48, 9, 1, 1, 0, 1, 252, 3139
Offset: 0

Views

Author

Henry Bottomley, Oct 22 2002

Keywords

Comments

From Michel Marcus, Dec 01 2012: (Start)
A pair of numbers written in base n are said to be comparable if all digits of the first number are at least as big as the corresponding digit of the second number, or vice versa. Otherwise, this pair will be defined as uncomparable. A set of pairwise uncomparable integers will be called anti-hierarchic.
T(n,k) is the size of the maximal anti-hierarchic set of integers written with k digits in base n.
For example, for base n=2 and k=4 digits:
- 0 (0000) and 15 (1111) are comparable, while 6 (0110) and 9 (1001) are uncomparable,
- the maximal antihierarchic set is {3 (0011), 5 (0101), 6 (0110), 9 (1001), 10 (1010), 12 (1100)} with 6 elements that are all pairwise uncomparable. (End)

Examples

			Rows of square array start:
  1,    0,    0,    0,    0,    0,    0, ...
  1,    1,    1,    1,    1,    1,    1, ...
  1,    1,    2,    3,    6,   10,   20, ...
  1,    1,    3,    7,   19,   51,  141, ...
  1,    1,    4,   12,   44,  155,  580, ...
  1,    1,    5,   19,   85,  381, 1751, ...
  ...
Read by antidiagonals:
  1;
  0, 1;
  0, 1, 1;
  0, 1, 1, 1;
  0, 1, 2, 1, 1;
  0, 1, 3, 3, 1, 1;
  0, 1, 6, 7, 4, 1, 1;
  ...
		

Crossrefs

Programs

Formula

By the central limit theorem, T(n,k) is roughly n^(k-1)*sqrt(6/(Pi*k)).
T(n,k) = Sum{j=0,h/n} (-1)^j*binomial(k,j)*binomial(k-1+h-n*j,k-1) with h=floor(k*(n-1)/2), k>0. - Michel Marcus, Dec 01 2012

A274581 Number T(n,k) of set partitions of [n] with alternating parity of elements and exactly k blocks; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 3, 1, 0, 1, 5, 7, 4, 1, 0, 1, 7, 14, 12, 5, 1, 0, 1, 11, 30, 33, 19, 6, 1, 0, 1, 15, 57, 84, 62, 27, 7, 1, 0, 1, 23, 119, 222, 204, 108, 37, 8, 1, 0, 1, 31, 224, 545, 627, 409, 169, 48, 9, 1, 0, 1, 47, 460, 1425, 2006, 1558, 763, 254, 61, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 29 2016

Keywords

Examples

			T(5,1) = 1: 12345.
T(5,2) = 5: 1234|5, 123|45, 12|345, 145|23, 1|2345.
T(5,3) = 7: 123|4|5, 12|34|5, 12|3|45, 1|234|5, 145|2|3, 1|2|345, 1|23|45.
T(5,4) = 4: 12|3|4|5, 1|23|4|5, 1|2|34|5, 1|2|3|45.
T(5,5) = 1: 1|2|3|4|5.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,  1;
  0, 1,  2,   1;
  0, 1,  3,   3,   1;
  0, 1,  5,   7,   4,   1;
  0, 1,  7,  14,  12,   5,   1;
  0, 1, 11,  30,  33,  19,   6,   1;
  0, 1, 15,  57,  84,  62,  27,   7,  1;
  0, 1, 23, 119, 222, 204, 108,  37,  8, 1;
  0, 1, 31, 224, 545, 627, 409, 169, 48, 9, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A057427, A052955(n-2) for n>1, A305777, A305778, A305779, A305780, A305781, A305782, A305783, A305784.
Diagonals include A000012, A001477, A077043.
Row sums give A274547.
T(n,ceiling(n/2)) gives A305785.
Cf. A124419, A274310 (parities alternate within blocks), A305823.

Programs

  • Maple
    b:= proc(l, i, t) option remember; `if`(l=[], x,
         `if`(l[1]=t, 0, expand(x*b(subsop(1=[][], l), 1, 1-t)
           ))+add(`if`(l[j]=t, 0, b(subsop(j=[][], l), j, 1-t)
           ), j=i..nops(l)))
        end:
    T:= n-> `if`(n=0, 1, (p-> seq(coeff(p, x, j), j=0..n))(
             b([seq(irem(i, 2), i=2..n)], 1$2))):
    seq(T(n), n=0..12);
  • Mathematica
    b[l_, i_, t_] := b[l, i, t] = If[l == {}, x, If[l[[1]] == t, 0, Expand[x*b[Rest[l], 1, 1 - t]]] + Sum[If[l[[j]] == t, 0, b[Delete[l, j], j, 1 - t]], {j, i, Length[l]}]];
    T[n_] := If[n==0, {1}, Function[p, Table[Coefficient[p, x, j], {j, 0, n}]][ b[Table[Mod[i, 2], {i, 2, n}], 1, 1]]];
    Flatten[Table[T[n], {n, 0, 12}]] (* Jean-François Alcover, May 27 2018, from Maple *)

Formula

Sum_{k=0..n} k * T(n,k) = A305823(n).

A132894 Number of (1,0) steps in all paths of length n with steps U=(1,1), D=(1,-1) and H=(1,0), starting at (0,0), staying weakly above the x-axis (i.e., in all length-n left factors of Motzkin paths).

Original entry on oeis.org

0, 1, 4, 15, 52, 175, 576, 1869, 6000, 19107, 60460, 190333, 596652, 1863745, 5804176, 18028755, 55873872, 172818243, 533589660, 1644921789, 5063762220, 15568666029, 47811348816, 146675181975, 449538774048, 1376564658525
Offset: 0

Views

Author

Emeric Deutsch, Oct 07 2007

Keywords

Comments

Number of peaks (i.e., UDs) in all paths of length n+1 with steps U=(1,1), D=(1,-1) and H=(1,0), starting at (0,0), staying weakly above the x-axis (i.e., in all length n+1 left factors of Motzkin paths). Example: a(2)=4 because in the 13 (=A005773(4)) length-3 left factors of Motzkin paths, namely HHH, HHU, H(UD), HUH, HUU, (UD)H, (UD)U, UHD, UHH, UHU, U(UD), UUH and UUU, we have altogether 4 peaks (shown between parentheses).
This could be called the Motzkin transform of A077043 because the substitution x -> x*A001006(x) in the independent variable of the g.f. of A077043 yields the g.f. of this sequence here. - R. J. Mathar, Nov 10 2008

Examples

			a(2) = 4 because in the 5 (=A005773(3)) length-2 left factors of Motzkin paths, namely HH, HU, UD, UH and UU, we have altogether 4 H steps.
G.f. = x + 4*x^2 + 15*x^3 + 52*x^4 + 175*x^5 + 576*x^6 + 1869*x^7 + 6000*x^8 + ...
		

Crossrefs

Column k=1 of A328347.

Programs

  • Maple
    a := n -> add(k*binomial(n, k)*binomial(n-k, floor((n-k)/2)), k=0..n): seq(a(n), n=0..25);
    # second Maple program:
    a:= proc(n) a(n):=`if`(n<2, n, 2*n/(n-1)*a(n-1)+3*a(n-2)) end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 15 2013
  • Mathematica
    a[n_] := n*Hypergeometric2F1[3/2, 1-n, 2, 4]; Table[ a[n] // Abs, {n, 0, 25}] (* Jean-François Alcover, Jul 10 2013 *)
    a[ n_] := If[ n < 0, 0, -(-1)^n n Hypergeometric2F1[ 3/2, 1 - n, 2, 4]]; (* Michael Somos, Aug 06 2014 *)
  • Sage
    A132894 = lambda n: (-1)^(n+1)*jacobi_P(n-1,1,-n+1/2,-7)
    [Integer(A132894(n).n(40),16) for n in range(26)] # Peter Luschny, Sep 23 2014

Formula

a(n) = Sum_{k=0..n} k*A107230(n,k).
a(n) = Sum_{k=0..floor((n+1)/2)} k*A132893(n+1,k).
a(n) = Sum_{k=0..n} k*C(n,k)*C(n-k, floor((n-k)/2)).
G.f.: z/((1-3*z)*sqrt(1-2*z-3*z^2)).
a(n) = Sum_{k=0..n} k*C(n,k)*C(2*k,k)*(-1)^(n-k). - Wadim Zudilin, Oct 11 2010
E.g.f.: exp(x)*x*(BesselI(0, 2*x) + BesselI(1, 2*x)). - Peter Luschny, Aug 25 2012
a(n) = 2*n/(n-1)*a(n-1) + 3*a(n-2) for n>=2, a(n) = n for n<2. a(n) = n*A005773(n). - Alois P. Heinz, Jul 15 2013
a(n) ~ 3^(n-1/2)*sqrt(n/Pi). - Vaclav Kotesovec, Oct 08 2013
a(n) = (-1)^(n+1)*JacobiP(n-1,1,-n+1/2,-7). - Peter Luschny, Sep 23 2014

A235988 Sum of the partition parts of 3n into 3 parts.

Original entry on oeis.org

3, 18, 63, 144, 285, 486, 777, 1152, 1647, 2250, 3003, 3888, 4953, 6174, 7605, 9216, 11067, 13122, 15447, 18000, 20853, 23958, 27393, 31104, 35175, 39546, 44307, 49392, 54897, 60750, 67053, 73728, 80883, 88434, 96495, 104976, 113997, 123462, 133497, 144000
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 17 2014

Keywords

Examples

			a(2) = 18; 3(2) = 6 has 3 partitions into 3 parts: (4, 1, 1), (3, 2, 1), and (2, 2, 2). The sum of the parts is 18.
Figure 1: The partitions of 3n into 3 parts for n = 1, 2, 3, ...
                                               13 + 1 + 1
                                               12 + 2 + 1
                                               11 + 3 + 1
                                               10 + 4 + 1
                                                9 + 5 + 1
                                                8 + 6 + 1
                                                7 + 7 + 1
                                   10 + 1 + 1  11 + 2 + 2
                                    9 + 2 + 1  10 + 3 + 2
                                    8 + 3 + 1   9 + 4 + 2
                                    7 + 4 + 1   8 + 5 + 2
                                    6 + 5 + 1   7 + 6 + 2
                        7 + 1 + 1   8 + 2 + 2   9 + 3 + 3
                        6 + 2 + 1   7 + 3 + 2   8 + 4 + 3
                        5 + 3 + 1   6 + 4 + 2   7 + 5 + 3
                        4 + 4 + 1   5 + 5 + 2   6 + 6 + 3
            4 + 1 + 1   5 + 2 + 2   6 + 3 + 3   7 + 4 + 4
            3 + 2 + 1   4 + 3 + 2   5 + 4 + 3   6 + 5 + 4
1 + 1 + 1   2 + 2 + 2   3 + 3 + 3   4 + 4 + 4   5 + 5 + 5
   3(1)        3(2)        3(3)        3(4)        3(5)     ..    3n
------------------------------------------------------------------------
    3           18          63         144         285      ..   a(n)
- _Wesley Ivan Hurt_, Sep 07 2019
		

Crossrefs

Programs

  • Magma
    [3*n^3-3*n*Floor(n^2/4): n in [1..100]]; // Wesley Ivan Hurt, Nov 01 2015
    
  • Magma
    [3*n*(1-(-1)^n+6*n^2)/8: n in [1..40]]; // Vincenzo Librandi, Nov 18 2015
  • Maple
    A235988:=n->3*n^3 - 3*n*floor(n^2/4); seq(A235988(n), n=1..100);
  • Mathematica
    Table[3 n^3 - 3 n*Floor[n^2/4], {n, 100}] (* or *) CoefficientList[ Series[3*x*(x^4 + 4*x^3 + 8*x^2 + 4*x + 1)/((x - 1)^4*(x + 1)^2), {x, 0, 30}], x]
    LinearRecurrence[{2,1,-4,1,2,-1},{3,18,63,144,285,486},40] (* Harvey P. Dale, May 17 2018 *)
  • PARI
    a(n)=3*n^3 - n^2\4*3*n \\ Charles R Greathouse IV, Oct 07 2015
    
  • PARI
    x='x+O('x^50); Vec(3*x*(x^4+4*x^3+8*x^2+4*x+1)/((x-1)^4*(x+1)^2)) \\ Altug Alkan, Nov 01 2015
    

Formula

a(n) = 3*n^3 - 3*n*floor(n^2/4).
a(n) = 3n * A077043(n).
a(n) = a(n-1) + 3*A077043(n-1) + A001651(n) + A093353(3n-2).
From Colin Barker, Jan 18 2014: (Start)
a(n) = (3*n*(1-(-1)^n+6*n^2))/8.
G.f.: 3*x*(x^4+4*x^3+8*x^2+4*x+1) / ((x-1)^4*(x+1)^2). (End)
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n > 6. - Wesley Ivan Hurt, Nov 15 2015
E.g.f.: 3*x*((4 + 9*x + 3*x^2)*cosh(x) + 3*(1 + 3*x + x^2)*sinh(x))/4. - Stefano Spezia, Feb 09 2023

Extensions

a(165) in b-file corrected by Andrew Howroyd, Feb 21 2018

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

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 11, 14, 17, 21, 24, 29, 33, 38, 43, 49, 54, 61, 67, 74, 81, 89, 96, 105, 113, 122, 131, 141, 150, 161, 171, 182, 193, 205, 216, 229, 241, 254, 267, 281, 294, 309, 323, 338, 353, 369, 384, 401, 417, 434, 451, 469, 486, 505, 523, 542, 561
Offset: 0

Views

Author

Keywords

Comments

For n>=1, the set {A008747(6n+-1)} is the set of numbers of the form a^2 + 5*(a+1)^2 for -inf < a < inf. Furthermore the set A008747(6n) is A033581(n). - Kieren MacMillan, Dec 19 2007
For n>1, a(n-1) is the number of aperiodic necklaces (Lyndon words) with k<=3 black beads and n-k white beads. For n=4 we have for example a(3)=3 aperiodic necklaces: BWWW, BBWW and BBBW. BWBW is periodic and is not counted. - Herbert Kociemba, Oct 23 2016

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 6*x^5 + 9*x^6 + 11*x^7 + 14*x^8 + ...
		

Crossrefs

Programs

  • GAP
    a:=[1,1,2,3,5,6];; for n in [7..60] do a[n]:=a[n-1]+a[n-2]-a[n-4] -a[n-5]+a[n-6]; od; a; # G. C. Greubel, Aug 03 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1+x^4)/((1-x)*(1-x^2)*(1-x^3)) )); // G. C. Greubel, Aug 03 2019
    
  • Maple
    A008747:=n->ceil((n+1)^2/6): seq(A008747(n), n=0..100); # Wesley Ivan Hurt, Oct 25 2016
  • Mathematica
    CoefficientList[Series[(1+x^4)/((1-x)(1-x^2)(1-x^3)),{x,0,60}],x] (* or *) LinearRecurrence[{1,1,0,-1,-1,1},{1,1,2,3,5,6},60] (* Harvey P. Dale, Sep 05 2012 *)
  • PARI
    Vec((1+x^4)/((1-x)*(1-x^2)*(1-x^3))+O(x^60)) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Sage
    ((1+x^4)/((1-x)*(1-x^2)*(1-x^3))).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Aug 03 2019
    

Formula

G.f.: (1+x^4)/((1-x)*(1-x^2)*(1-x^3)).
a(n) = ceiling((n+1)^2/6).
a(n) = (12*n + 23 + 6*n^2 + 9*(-1)^n + 4*A061347(n))/36. - R. J. Mathar, Mar 15 2011
a(0)=1, a(1)=1, a(2)=2, a(3)=3, a(4)=5, a(5)=6, a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n > 5. - Harvey P. Dale, Sep 05 2012
From Michael Somos, Oct 25 2016: (Start)
Euler transform of length 8 sequence [ 1, 1, 1, 1, 0, 0, 0, -1].
a(n) = a(-2-n) for all n in Z.
a(2*n-1) = A071619(n).
a(3*n-1) = 2*A077043(n).
a(n) - a(n-1) = A051274(n). (End)

A129819 Antidiagonal sums of triangular array T: T(j,k) = (k+1)/2 for odd k, T(j,k) = 0 for k = 0, T(j,k) = j+1-k/2 for even k > 0; 0 <= k <= j.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 7, 8, 12, 14, 19, 21, 27, 30, 37, 40, 48, 52, 61, 65, 75, 80, 91, 96, 108, 114, 127, 133, 147, 154, 169, 176, 192, 200, 217, 225, 243, 252, 271, 280, 300, 310, 331, 341, 363, 374, 397, 408, 432, 444, 469, 481, 507, 520, 547, 560, 588, 602, 631
Offset: 0

Views

Author

Paul Curtz, May 20 2007

Keywords

Comments

Interleaving of A077043 and A006578.
First differences are in A124072.
If the values of the second, fourth, sixth, ... column are replaced by the corresponding negative values, the antidiagonal sums of the resulting triangular array are 0, 0, 1, 1, -1, -2, -1, -2, -6, -8, -7, -9, ... .
Row sums of triangle A168316 = (1, 1, 3, 4, 7, 8, 12, ...). - Gary W. Adamson, Nov 22 2009

Examples

			First seven rows of T are
  0;
  0, 1;
  0, 1, 2;
  0, 1, 3, 2;
  0, 1, 4, 2, 3;
  0, 1, 5, 2, 4, 3;
  0, 1, 6, 2, 5, 3, 4;.
		

Crossrefs

Programs

  • Magma
    m:=59; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do for k:=2 to j do if k mod 2 eq 0 then M[j, k]:= k div 2; else M[j, k]:=j-(k div 2); end if; end for; end for; [ &+[ M[j-k+1, k]: k in [1..(j+1) div 2] ]: j in [1..m] ]; // Klaus Brockhaus, Jul 16 2007
    
  • Magma
    A129819:= func< n | Floor(((n-1)*(3*n+1) +(2*n+5)*((n+1) mod 2))/16) >;
    [A129819(n): n in [0..70]]; // G. C. Greubel, Sep 19 2024
    
  • Mathematica
    CoefficientList[Series[x^2*(1+x^2+x^3)/((1-x)*(1-x^2)*(1-x^4)), {x, 0, 70}], x] (* G. C. Greubel, Sep 19 2024 *)
  • PARI
    {vector(59, n, (n-2+n%2)*(n+n%2)/8+floor((n-2-n%2)^2/16))} \\ Klaus Brockhaus, Jul 16 2007
    
  • SageMath
    def A129819(n): return ((n-1)*(3*n+1) + (2*n+5)*((n+1)%2))//16
    [A129819(n) for n in range(71)] # G. C. Greubel, Sep 19 2024

Formula

a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7) for n > 6, with a(0) = 0, a(1) = 0, a(2) = 1, a(3) = 1, a(4) = 3, a(5) = 4, a(6) = 7.
G.f.: x^2*(1+x^2+x^3)/((1-x)^3*(1+x)^2*(1+x^2)).
a(n) = (3/16)*(n+2)*(n+1) - (5/8)*(n+1) + 7/32 + (3/32)*(-1)^n + (1/16)*(n+1)*(-1)^n - (1/8)*cos(n*Pi/2) + (1/8)*sin(n*Pi/2). - Richard Choulet, Nov 27 2008

Extensions

Edited and extended by Klaus Brockhaus, Jul 16 2007

A109439 Triangle read by rows, in which row n gives coefficients in expansion of ((1 - x^n)/(1 - x))^3.

Original entry on oeis.org

1, 1, 3, 3, 1, 1, 3, 6, 7, 6, 3, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 3, 6, 10, 15, 18, 19, 18, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 28, 33, 36, 37, 36, 33, 28, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 28, 36, 42, 46, 48, 48
Offset: 1

Views

Author

Labos Elemer, Jun 30 2005

Keywords

Comments

Sum of n-th row is n^3. The n-th row contains 3n-2 entries. Largest coefficients in rows are listed in A077043. The 255th row describes the distribution of color lattice points in the 765 r+g+b=k planes of the 24-bit RGB-cube with 256^3 points.
Also, the number of cubes of dimension 1 X 1 X 1 needed to build a cube by layers perpendicular to the main diagonal. Each layer is made up of regular triangular numbers T near the summits and truncated T's in the middle. E.g., cube 3^3 is made of layers 1, 3, 6, 7, 6, 3, 1, using T1, T2, T3 and a regularly truncated T4, 7 instead of 10. - M. Dauchez (mdzzdm(AT)yahoo.fr), Aug 31 2005
The n-th row is the third row of the (n+1)-nomial triangle. For example, row 1 (1,3,3,1) is the third row in the binomial triangle; row 5 is the third row of the 6-nomial triangle. - Bob Selcoe, Feb 18 2014
It appears that T(n,k) gives the number of possible ways of randomly selecting k cards from n-1 sets, each with three different playing cards. - Juan Pablo Herrera P., Nov 04 2016

Examples

			Triangle starts:
  1;
  1, 3, 3, 1;
  1, 3, 6, 7, 6, 3, 1;
  1, 3, 6,10,12,12,10, 6, 3, 1;
  1, 3, 6,10,15,18,19,18,15,10, 6, 3, 1;
  1, 3, 6,10,15,21,25,27,27,25,21,15,10, 6, 3, 1;
  1, 3, 6,10,15,21,28,33,36,37,36,33,28,21,15,10, 6, 3, 1.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[CoefficientList[Series[((1-x^n)/(1-x))^3,{x,1,3*n}],x], {n,1,100}],1]
  • PARI
    row(n) = Vec(((1 - x^n)/(1 - x))^3);
    tabf(nn) = for (n=1, nn, print(row(n))); \\ Michel Marcus, Oct 12 2016

Formula

From Juan Pablo Herrera P., Oct 17 2016: (Start)
T(n,k) = A000217(k+1) = (k+2)!/(k!*2) if 0 <= k < n,
T(n,k) = (9*n-3*n^2+6*k*n-6*k-2*k^2-4)/2 if n-3 < k < 2*n,
T(n,k) = A000217(3n-k-2) = (3*n-k-1)!/((3*(n-1)-k)!*2) if 2*n-3 < k < 3*n-2.
T(n,k) = Sum_{i=k-n+1..k} A004737(T(n,i)),
T(n,k) = Sum_{i=k-n+1..k} (n-|n-i-1|) if n <= k <= 2*n+1. (End)

Extensions

Offset corrected by Joerg Arndt at the suggestion of Michel Marcus, Oct 12 2016

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

Original entry on oeis.org

1, 6, 16, 30, 49, 72, 100, 132, 169, 210, 256, 306, 361, 420, 484, 552, 625, 702, 784, 870, 961, 1056, 1156, 1260, 1369, 1482, 1600, 1722, 1849, 1980, 2116, 2256, 2401, 2550, 2704, 2862, 3025, 3192, 3364, 3540, 3721, 3906, 4096, 4290, 4489, 4692, 4900
Offset: 0

Views

Author

Creighton Dement, Feb 17 2005

Keywords

Comments

A floretion-generated sequence.
a(n) gives the number of triples (x,y,x+y) with positive integers satisfying x < y and x + y <= 3*n. - Marcus Schmidt (marcus-schmidt(AT)gmx.net), Jan 13 2006
Number of different partitions of numbers x + y = z such that {x,y,z} are integers {1,2,3,...,3n} and z > y > x. - Artur Jasinski, Feb 09 2010
Second bisection preceded by zero is A152743. - Bruno Berselli, Oct 25 2011
a(n) has no final digit 3, 7, 8. - Paul Curtz, Mar 04 2020
One odd followed by three evens.
From Paul Curtz, Mar 06 2020: (Start)
b(n) = 0, 1, 6, 16, 30, 49, ... = 0, a(n).
( 25, 12, 4, 0, 1, 6, 16, 30, ...
-13, -8, -4 1, 5, 10, 14, 19, ...
5, 4, 5, 4, 5, 4, 5, 4, ... .)
b(-n) = 0, 4, 12, 25, 42, 64, 90, 121, ... .
A154589(n) are in the main diagonal of b(n) and b(-n). (End)

Crossrefs

Programs

  • Magma
    [(6*n*(3*n+4)+(-1)^n+7)/8: n in [0..60]]; // Vincenzo Librandi, Oct 26 2011
    
  • Mathematica
    aa = {}; Do[i = 0; Do[Do[Do[If[x + y == z, i = i + 1], {x, y + 1, 3 n}], {y, 1, 3 n}], {z, 1, 3 n}]; AppendTo[aa, i], {n, 1, 20}]; aa (* Artur Jasinski, Feb 09 2010 *)
  • PARI
    a(n)=(6*n*(3*n+4)+(-1)^n+7)/8 \\ Charles R Greathouse IV, Apr 16 2020

Formula

G.f.: -(4*x^2 + 4*x + 1)/((x+1)*(x-1)^3) = (1+2*x)^2/((1+x)*(1-x)^3).
a(2n) = A016778(n) = (3n+1)^2.
a(n) + a(n+1) = A038764(n+1).
a(n) = floor( (3*n+2)/2 ) * ceiling( (3*n+2)/2 ). - Marcus Schmidt (marcus-schmidt(AT)gmx.net), Jan 13 2006
a(n) = (6*n*(3*n+4) + (-1)^n+7)/8. - Bruno Berselli, Oct 25 2011
a(n) = A198392(n) + A198392(n-1). - Bruno Berselli, Nov 06 2011
From Paul Curtz, Mar 04 2020: (Start)
a(n) = A006578(n) + A001859(n) + A077043(n+1).
a(n) = A274221(2+2*n).
a(20+n) - a(n) = 30*(32+3*n).
a(1+2*n) = 3*(1+n)*(2+3*n).
a(n) = A047237(n) * A047251(n).
a(n) = A001651(n+1) * A032766(n).(End)
E.g.f.: ((4 + 21*x + 9*x^2)*cosh(x) + 3*(1 + 7*x + 3*x^2)*sinh(x))/4. - Stefano Spezia, Mar 04 2020

Extensions

Definition rewritten by Bruno Berselli, Oct 25 2011

A220098 Manhattan distances between 2n and 1 in the double spiral with positive integers and 1 at the center.

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 4, 5, 6, 5, 4, 3, 4, 5, 6, 7, 6, 5, 4, 5, 6, 7, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 7, 8, 9, 10, 11, 12, 13
Offset: 1

Views

Author

Alex Ratushnyak, Dec 04 2012

Keywords

Comments

Double spiral begins:
.
82---84---86---88---90---92---94---96---98
|
80 51---53---55---57---59---61---63---65
| | |
78 49 26---28---30---32---34---36 67
| | | | |
76 47 24 11---13---15---17 38 69
| | | | | | |
74 45 22 9 2----4 19 40 71
| | | | | | | | |
72 43 20 7 1 6 21 42 73
| | | | | | | | |
70 41 18 5----3 8 23 44 75
| | | | | | |
68 39 16---14---12---10 25 46 77
| | | | |
66 37---35---33---31---29---27 48 79
| | |
64---62---60---58---56---54---52---50 81
|
99---97---95---93---91---89---87---85---83

Examples

			From _Philippe Deléham_, Mar 08 2013: (Start)
As a square array, this begins:
  1,  1,  2,  2,  3,  3,  4,  4,  5, ...
  2,  3,  3,  4,  4,  5,  5,  6,  6, ...
  2,  4,  5,  5,  6,  6,  7,  7,  8, ...
  3,  4,  6,  7,  7,  8,  8,  9,  9, ...
  3,  5,  6,  8,  9,  9, 10, 10, 11, ...
  4,  5,  7,  8, 10, 11, 11, 12, 12, ...
  4,  6,  7,  9, 10, 12, 13, 13, 14, ...
  5,  6,  8,  9, 11, 12, 14, 15, 15, ..., etc.
As a triangle, this begins:
  1
  2, 1
  2, 3, 2
  3, 4, 3, 2
  3, 4, 5, 4, 3
  4, 5, 6, 5, 4, 3, etc. (End)
		

Crossrefs

Programs

  • C
    #include 
    #define SIZE 20
    int grid[SIZE][SIZE];
    int direction[] = {0, -1,  1, 0, 0, 1, -1, 0};
    main() {
      int i, j, x1, y1, x2, y2, stepSize;
      int direction1pos=0, direction2pos=4, val;
      x1 = y1 = x2 = y2 = SIZE/2;
      for (val=grid[y1][x1]=1, stepSize=0; ; ++stepSize) {
        if (x1<1 || x1>=SIZE-1 || x2<1 || x2>=SIZE-1) break;
        if (y1<1 || y1>=SIZE-1 || y2<1 || y2>=SIZE-1) break;
        for (i=stepSize|1; i; ++val,--i) {
          x1 += direction[direction1pos  ];
          y1 += direction[direction1pos+1];
          x2 += direction[direction2pos  ];
          y2 += direction[direction2pos+1];
          grid[y1][x1] = val*2;
          grid[y2][x2] = val*2+1;
          printf("%d, ",abs(x1-SIZE/2)+abs(y1-SIZE/2));
        }
        direction1pos = (direction1pos+2) & 7;
        direction2pos = (direction2pos+2) & 7;
      }
      for (i=0; i
    				
  • PARI
    step(v, m) = concat(v, vector(m, k, 1+v[#v-k+1]))
    a(max_n) = {my(v=[0], k=1); while(#v < max_n+1, v=step(v,k); k++); v[2..max_n+1]} \\ Thomas Scheuerle, Jan 07 2025
    
  • PARI
    A053615(n) = if(n<1, 0, sqrtint(n) - A053615(n - sqrtint(n)))
    a(n) = A053615(floor( floor( (sqrtint(n*8) + 1)/2 )^2/2 ) + n) \\ Thomas Scheuerle, Jan 07 2025

Formula

abs( a(n) - a(n-1) ) = 1.
From Thomas Scheuerle, Jan 07 2025: (Start)
a(n*(n+1)/2 - k) = 1 + a(n*(n-1)/2 + k) with a(0) = 0 and for 0 <= k < n.
a(n) = A053615(A128217(n+1)). (End)

A256225 Number of partitions of 5n into 5 parts.

Original entry on oeis.org

0, 1, 7, 30, 84, 192, 377, 674, 1115, 1747, 2611, 3765, 5260, 7166, 9542, 12470, 16019, 20282, 25337, 31289, 38225, 46262, 55496, 66055, 78045, 91606, 106852, 123935, 142979, 164147, 187572, 213429, 241860, 273052, 307156, 344370, 384855, 428821, 476437, 527925
Offset: 0

Views

Author

Colin Barker, Mar 19 2015

Keywords

Examples

			For n=2, the 7 partitions of 10 are [6,1,1,1,1], [5,2,1,1,1], [4,3,1,1,1], [4,2,2,1,1], [3,3,2,1,1], [3,2,2,2,1] and [2,2,2,2,2].
		

Crossrefs

Programs

  • Mathematica
    Length /@ (Length /@ IntegerPartitions[5 #, {5}] & /@ Range@ 39) (* Michael De Vlieger, Mar 20 2015 *)
  • PARI
    concat(0, Vec(-x* (x^8+5*x^7+16*x^6+25*x^5+31*x^4+25*x^3+16*x^2+5*x+1) / ((x-1)^5*(x+1)^2*(x^2+1)*(x^2+x+1)) + O(x^100)))
    
  • PARI
    concat(0, vector(40, n, k=0; forpart(p=5*n, k++, , [5,5]); k)) \\ Colin Barker, Mar 21 2015

Formula

G.f.: -x*(x^8+5*x^7+16*x^6+25*x^5+31*x^4+25*x^3+16*x^2+5*x+1) / ((x-1)^5*(x+1)^2*(x^2+1)*(x^2+x+1)).
Previous Showing 11-20 of 40 results. Next