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 21-30 of 35 results. Next

A004739 Concatenation of sequences (1,2,2,...,n-1,n-1,n,n,n-1,n-1,...,2,2,1) for n >= 1.

Original entry on oeis.org

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

Views

Author

R. Muller

Keywords

Comments

From Artur Jasinski, Mar 07 2010: (Start)
Zeta(2, k/p) + Zeta(2, (p-k)/p) = (Pi/sin((Pi*a(n))/p))*2, where p=2,3,4, k=1..p-1.
This sequence is the odd subset of A003983 for odd p=3,5,7,9,....
For the even subset of A003983 see A004737. (End)
Table T(n,k) n, k > 0, T(n,k) = n-k+1, if n >= k, T(n,k) = k-n, if n < k. Table read by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). General case A209301. Let m be a natural number. The first column of the table T(n,1) is the sequence of the natural numbers A000027. In all columns with number k (k > 1) the segment with the length of (k-1): {m+k-2, m+k-3, ..., m} shifts the sequence A000027. For m=1 the result is A004739, for m=2 the result is A004738, for m=3 the result is A209301. - Boris Putievskiy, Jan 24 2013

Examples

			From _Boris Putievskiy_, Jan 24 2013: (Start)
The start of the sequence as table:
  1, 1, 2, 3, 4, 5, 6, ...
  2, 1, 1, 2, 3, 4, 5, ...
  3, 2, 1, 1, 2, 3, 4, ...
  4, 3, 2, 1, 1, 2, 3, ...
  5, 4, 3, 2, 1, 1, 2, ...
  6, 5, 4, 3, 2, 1, 1, ...
  7, 6, 5, 4, 3, 2, 1, ...
  ...
The start of the sequence as triangle array read by rows:
  1;
  1, 1, 2;
  2, 1, 1, 2, 3;
  3, 2, 1, 1, 2, 3, 4;
  4, 3, 2, 1, 1, 2, 3, 4, 5;
  5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6;
  6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7;
  ...
Row number r contains 2*r - 1 numbers: r-1, r-2, ..., 1, 1, 2, ..., r. (End)
		

Crossrefs

Programs

  • Haskell
    a004739 n = a004739_list !! (n-1)
    a004739_list = concat $ map (\n -> [1..n] ++ [n,n-1..1]) [1..]
    -- Reinhard Zumkeller, Mar 26 2011
  • Mathematica
    aa = {}; Do[Do[AppendTo[aa, (p/Pi) ArcSin[Sqrt[1/((1/Pi^2) (Zeta[2, k/p] + Zeta[2, (p - k)/p]))]]], {k, 1, p - 1}], {p, 3, 50, 2}]; Round[N[aa, 50]] (* Artur Jasinski, Mar 07 2010 *)

Formula

From Boris Putievskiy, Jan 24 2013: (Start)
For the general case,
a(n) = m*v + (2*v-1)*(t*t-n) + t, where t = floor(sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1.
For m=1,
a(n) = v + (2*v-1)*(t*t-n) + t, where t = floor(sqrt(n) - 1/2) + 1 and v = floor((n-1)/t) - t + 1. (End)

Extensions

More terms from Patrick De Geest, Jun 15 1998

A106255 Triangle composed of triangular numbers, row sums = A006918.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 3, 6, 3, 1, 1, 3, 6, 6, 3, 1, 1, 3, 6, 10, 6, 3, 1, 1, 3, 6, 10, 10, 6, 3, 1, 1, 3, 6, 10, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 15, 10, 6, 3, 1
Offset: 1

Views

Author

Gary W. Adamson, Apr 28 2005

Keywords

Comments

Perform the operation Q * R; Q = infinite lower triangular matrix with 1, 2, 3, ... in each column (offset, fill in spaces with zeros). Q = upper right triangular matrix of the form:
1, 1, 1, 1, ...
0, 1, 1, 1, ...
0, 0, 1, 1, ...
0, 0, 0, 1, ...
Q * R generates an array:
1, 1, 1, 1, ...
1, 3, 3, 3, ...
1, 3, 6, 6, ...
1, 3, 6, 10, ...
...
... from which we take antidiagonals forming the rows of this triangle.

Examples

			From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as table:
  1, 1, 1,  1,  1,  1, ...
  1, 3, 3,  3,  3,  3, ...
  1, 3, 6,  6,  6,  6, ...
  1, 3, 6, 10, 10, 10, ...
  1, 3, 6, 10, 15, 15, ...
  1, 3, 6, 10, 15, 21, ...
  1, 3, 6, 10, 15, 21, ...
  ...
(End)
Triangle rows or columns can be generated by following the triangle format:
  1;
  1, 1;
  1, 3, 1;
  1, 3, 3,  1;
  1, 3, 6,  3,  1;
  1, 3, 6,  6,  3,  1;
  1, 3, 6, 10,  6,  3,  1;
  1, 3, 6, 10, 10,  6,  3,  1;
  1, 3, 6, 10, 15, 10,  6,  3, 1;
  1, 3, 6, 10, 15, 15, 10,  6, 3, 1;
  1, 3, 6, 10, 15, 21, 15, 10, 6, 3, 1;
  ...
		

Crossrefs

Cf. A006918 (row sums, without the zero), A002260, A004736.

Programs

  • Mathematica
    p[x_, n_] = Sum[x^i*If[i ==Floor[n/2] && Mod[n, 2] == 0, 0, If[i <= Floor[n/2], 2*(i + 1), -(2*((n + 1) - i))]], {i, 0, n}]/(2*(1 - x));
    Table[CoefficientList[FullSimplify[p[x, n]], x], {n, 1, 11}];
    Flatten[%]

Formula

From Boris Putievskiy, Jan 13 2013: (Start)
T(n,k) = min(n*(n+1)/2,k*(k+1)/2), read by antidiagonals.
a(n) = min(A002260(n)*(A002260(n)+1)/2, A004737(n)*(A004737(n)+1)/2).
a(n) = min(i*(i+1)/2, j*(j+1)/2), where
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n,
t = floor((-1+sqrt(8*n-7))/2). (End)

Extensions

Additional comments from Roger L. Bagula and Gary W. Adamson, Apr 02 2009

A133823 Triangle whose rows are sequences of increasing and decreasing cubes:1; 1,8,1; 1,8,27,8,1; ... .

Original entry on oeis.org

1, 1, 8, 1, 1, 8, 27, 8, 1, 1, 8, 27, 64, 27, 8, 1, 1, 8, 27, 64, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 343, 216, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 343, 512, 343, 216, 125, 64, 27, 8, 1, 1, 8, 27, 64, 125, 216, 343, 512, 729
Offset: 0

Views

Author

Peter Bala, Sep 25 2007

Keywords

Comments

Reading the triangle by rows produces the sequence 1,1,8,1,1,8,27,8,1,..., analogous to A004737.
T(n,k) = min(n,k)^3. The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). - Boris Putievskiy, Jan 13 2013

Examples

			Triangle starts
  1;
  1, 8, 1;
  1, 8, 27, 8, 1;
  1, 8, 27, 64, 27, 8, 1;
From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as table:
  1...1...1...1...1...1...
  1...8...8...8...8...8...
  1...8..27..27..27..27...
  1...8..27..64..64..64...
  1...8..27..64.125.125...
  1...8..27..64.125.216...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  1,8,1;
  1,8,27,8,1;
  1,8,27,64,27,8,1;
  1,8,27,64,125,64,27,8,1;
  1,8,27,64,125,216,125,64,27,8,1;
  . . .
Row number k contains 2*k-1 numbers 1,8,...,(k-1)^3,k^3,(k-1)^3,...,8,1. (End)
		

Crossrefs

Programs

  • Mathematica
    Table[Join[Range[n]^3,Range[n-1,1,-1]^3],{n,10}]//Flatten (* Harvey P. Dale, May 29 2019 *)

Formula

O.g.f.: (1+qx)(1+4qx+q^2x^2)/((1-x)(1-qx)^3(1-q^2x)) = 1 + x(1 + 8q + q^2) + x^2(1 + 8q + 27q^2 + 8q^3 + q^4) + ... .
From Boris Putievskiy, Jan 13 2013: (Start)
a(n) = (A004737(n))^3.
a(n) = (floor(sqrt(n-1)) - |n- floor(sqrt(n-1))^2- floor(sqrt(n-1))-1| +1)^3. (End)

A133824 Triangle whose rows are sequences of increasing and decreasing fourth powers: 1; 1,16,1; 1,16,81,16,1; ... .

Original entry on oeis.org

1, 1, 16, 1, 1, 16, 81, 16, 1, 1, 16, 81, 256, 81, 16, 1, 1, 16, 81, 256, 625, 256, 81, 16, 1, 1, 16, 81, 256, 625, 1296, 625, 256, 81, 16, 1, 1, 16, 81, 256, 625, 1296, 2401, 1296, 625, 256, 81, 16, 1, 1, 16, 81, 256, 625, 1296, 2401, 4096, 2401, 1296, 625, 256, 81, 16
Offset: 0

Views

Author

Peter Bala, Sep 25 2007

Keywords

Comments

Reading the triangle by rows produces the sequence 1,1,16,1,1,16,81,16,1,..., analogous to A004737.
From - Boris Putievskiy, Jan 13 2013: (Start)
The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1).
Row number k contains 2*k-1 numbers 1,16,...,(k-1)^4,k^4,(k-1)^4,...,16,1. (End)

Examples

			Triangle starts:
  1;
  1, 16, 1;
  1, 16, 81, 16, 1;
  1, 16, 81, 256, 81, 16, 1;
  ...
From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as table:
  1...1...1...1...1.. .1...
  1..16..16..16..16...16...
  1..16..81..81..81...81...
  1..16..81.256.256..256...
  1..16..81.256.625..625...
  1..16..81.256.625.1296...
  ...
(End)
		

Crossrefs

Programs

  • Mathematica
    p4[n_]:=Module[{c=Range[n]^4},Join[c,Rest[Reverse[c]]]]; Flatten[p4/@ Range[10]] (* Harvey P. Dale, Dec 08 2014 *)

Formula

O.g.f.: (1+qx)(1+11qx+11q^2x^2+q^3x^3)/((1-x)(1-qx)^4(1-q^2x)) = 1 + x(1 + 16q + q^2) + x^2(1 + 16q + 81q^2 + 16q^3 + q^4) + ... . Cf. 4th row of A008292.
From Boris Putievskiy, Jan 13 2013: (Start)
T(n,k) = min(n,k)^4.
a(n) = (A004737(n))^4.
a(n) = (A124258(n))^2.
a(n) = (floor(sqrt(n-1)) - |n- floor(sqrt(n-1))^2- floor(sqrt(n-1))-1| +1)^4. (End)

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

Original entry on oeis.org

1, 1, 4, 6, 4, 1, 1, 4, 10, 16, 19, 16, 10, 4, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1, 1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1, 1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1
Offset: 1

Views

Author

Juan Pablo Herrera P., Nov 05 2016

Keywords

Comments

Sum of n-th row is n^4. The n-th row contains 4n-3 entries. Largest coefficients of each row are listed in A005900.
The n-th row is the fourth row of the n-nomial triangle. For example, row 2 (1,4,6,4,1) is the fourth row in the binomial triangle.
T(n,k) gives the number of possible ways of randomly selecting k cards from n-1 sets, each with four different playing cards. It is also the number of lattice paths from (0,0) to (4,k) using steps (1,0), (1,1), (1,2), ..., (1,n-1).

Examples

			Triangle starts:
1;
1, 4, 6, 4, 1;
1, 4, 10, 16, 19, 16, 10, 4, 1;
1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1;
1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1;
1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1.
...
There are T(3,2) = 10 ways to select 2 cards from two sets of four playing cards ABCD, namely, {AA}, {AB}, {AC}, {AD}, {BB}, {BC}, {BD}, {CC}, {CD}, and {DD}.
		

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[Series[((x^n - 1)/(x - 1))^4, {x, 0, 4 n}], x], {n, 6}] // Flatten (* Michael De Vlieger, Nov 10 2016 *)
  • PARI
    row(n) = Vec(((1 - x^n)/(1 - x))^4);
    tabf(nn) = for (n=1, nn, print(row(n)));

Formula

T(n,k) = Sum_{i=k-n+1..k} A109439(T(n,i)).
T(n,k) = A000292(k+1) = (k+3)!/(k!*6) if 0 =< k < n,
T(n,k) = ((k+3)*(k+2)*(k+1)-4*(k-n+3)*(k-n+2)*(k-n+1))/6 if n =< k < 2*n,
T(n,k) = ((4*n-1-k)*(4*n-2-k)*(4*n-3-k)-4*(3*n-1-k)*(3*n-2-k)*(3*n-3-k))/6 if 2*n-3 =< k < 3*n-3,
T(n,k) = A000292(4*n-3-k) = (4*n-1-k)!/((4*n-4-k)!*6) if 3*n-3 =< k < 4n-3.

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

Original entry on oeis.org

1, 1, 5, 10, 10, 5, 1, 1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1, 1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1, 1, 5, 15, 35, 70, 121, 185, 255, 320, 365, 381, 365, 320, 255, 185, 121, 70, 35, 15, 5, 1
Offset: 1

Views

Author

Juan Pablo Herrera P., Nov 05 2016

Keywords

Comments

Sum of n-th row is n^5. The n-th row contains 5n-4 entries. Largest coefficients of each row are listed in A077044.
The n-th row is the fifth row of the n-nomial triangle. For example, row 2 (1,5,10,10,5,1) is the fifth row in the binomial triangle.
T(n,k) gives the number of possible ways of randomly selecting k cards from n-1 sets, each with five different playing cards. It is also the number of lattice paths from (0,0) to (5,k) using steps (1,0), (1,1), (1,2), ..., (1,n-1).

Examples

			Triangle starts:
1;
1, 5, 10, 10, 5, 1;
1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1;
1, 5, 15, 35, 65, 101, 135, 155, 155, 135, 101, 65, 35, 15, 5, 1;
1, 5, 15, 35, 70, 121, 185, 255, 320, 365, 381, 365, 320, 255, 185, 121, 70, 35, 15, 5, 1;
		

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[Series[((x^n - 1)/(x - 1))^5, {x, 0, 5 n}], x], {n, 10}] // Flatten
  • PARI
    row(n) = Vec(((1 - x^n)/(1 - x))^5); tabf(nn) = for (n=1, nn, print(row(n)));

Formula

T(n,k) = Sum_{i=k-n+1..k} A277949(T(n,i)).
From Juan Pablo Herrera P., Dec 20 2016: (Start)
T(n,k) = A000332(k+4) = (k+4)!/(k!*24) if 0 =< k < n.
T(n,k) = ((k+4)!/k!-5*(k-n+4)!/(k-n)!)/24 if n =< k < 2*n.
T(n,k) = ((k+4)!/k!-5*(k-n+4)!/(k-n)!+10*(k-2*n+4)!/(k-2*n)!)/24 if 2*n =< k < 3*n.
T(n,k) = ((5*n-k-1)!/(5*n-k-5)!-5*(4*n-k-1)!/(4*n-k-5)!)/24 if 3*n-4 =< k < 4*n-4.
T(n,k) = A000332(5*n-k-1) = (5*n-k-1)!/(5*n-k-5)!*24 4*n-4 =< k < 5*n-4. (End)

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

Original entry on oeis.org

1, 1, 6, 15, 20, 15, 6, 1, 1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1, 1, 6, 21, 56, 120, 216, 336, 456, 546, 580, 546, 456, 336, 216, 120, 56, 21, 6, 1, 1, 6, 21, 56, 126, 246, 426, 666, 951, 1246, 1506, 1686, 1751, 1686, 1506, 1246, 951, 666, 426, 246, 126, 56, 21, 6, 1
Offset: 1

Views

Author

Juan Pablo Herrera P., Nov 18 2016

Keywords

Comments

Sum of n-th row is n^6. The n-th row contains 6n-5 entries. Largest coefficients of each row are listed in A071816.
The n-th row is the sixth row of the n-nomial triangle. For example, row 2 (1,6,15,20,15,6,1) is the sixth row in the binomial triangle
T(n,k) gives the number of possible ways of randomly selecting k cards from n-1 sets, each with six different playing cards. It is also the number of lattice paths from (0,0) to (6,k) using steps (1,0), (1,1), (1,2), ..., (1,n-1).

Examples

			Triangle starts:
1;
1, 6, 15, 20, 15, 6, 1;
1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1;
1, 6, 21, 56, 120, 216, 336, 456, 546, 580, 546, 456, 336, 216, 120, 56, 21, 6, 1.
		

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[Series[((x^n - 1)/(x - 1))^6, {x, 0, 6 n}], x], {n, 10}] // Flatten
  • PARI
    row(n) = Vec(((1 - x^n)/(1 - x))^6);
    tabf(nn) = for (n=1, nn, print(row(n)));

Formula

T(n,k) = Sum_{i=k-n+1..k} A277950(T(n,i))

A366130 Number of subsets of {1..n} with a subset summing to n + 1.

Original entry on oeis.org

0, 0, 1, 2, 7, 15, 38, 79, 184, 378, 823, 1682, 3552, 7208, 14948, 30154, 61698, 124302, 252125, 506521, 1022768, 2051555, 4127633, 8272147, 16607469, 33258510, 66680774, 133467385, 267349211, 535007304, 1071020315, 2142778192, 4288207796
Offset: 0

Views

Author

Gus Wiseman, Oct 07 2023

Keywords

Examples

			The subset S = {1,2,4} has subset {1,4} with sum 4+1 and {2,4} with sum 5+1 and {1,2,4} with sum 6+1, so S is counted under a(4), a(5), and a(6).
The a(0) = 0 through a(5) = 15 subsets:
  .  .  {1,2}  {1,3}    {1,4}      {1,5}
               {1,2,3}  {2,3}      {2,4}
                        {1,2,3}    {1,2,3}
                        {1,2,4}    {1,2,4}
                        {1,3,4}    {1,2,5}
                        {2,3,4}    {1,3,5}
                        {1,2,3,4}  {1,4,5}
                                   {2,3,4}
                                   {2,4,5}
                                   {1,2,3,4}
                                   {1,2,3,5}
                                   {1,2,4,5}
                                   {1,3,4,5}
                                   {2,3,4,5}
                                   {1,2,3,4,5}
		

Crossrefs

For pairs summing to n + 1 we have A167762, complement A038754.
For n instead of n + 1 we have A365376, for pairs summing to n A365544.
The complement is counted by A365377 shifted.
The complement for pairs summing to n is counted by A365377.
A068911 counts subsets of {1..n} w/o two distinct elements summing to n.
A093971/A088809/A364534 count certain types of sum-full subsets.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[Total/@Subsets[#],n+1]&]],{n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A366130(n):
        a = tuple(set(p.keys()) for p in partitions(n+1,k=n) if max(p.values(),default=0)==1)
        return sum(1 for k in range(2,n+1) for w in (set(d) for d in combinations(range(1,n+1),k)) if any(s<=w for s in a)) # Chai Wah Wu, Nov 24 2023

Formula

Diagonal k = n + 1 of A365381.

Extensions

a(20)-a(32) from Chai Wah Wu, Nov 24 2023

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

Original entry on oeis.org

1, 0, 2, 1, 2, 2, 3, 2, 4, 3, 4, 4, 5, 4, 6, 5, 6, 6, 7, 6, 8, 7, 8, 8, 9, 8, 10, 9, 10, 10, 11, 10, 12, 11, 12, 12, 13, 12, 14, 13, 14, 14, 15, 14, 16, 15, 16, 16, 17, 16, 18, 17, 18, 18, 19, 18, 20, 19, 20, 20, 21, 20, 22, 21, 22, 22, 23, 22, 24, 23, 24, 24
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 12 ).
Diagonal sums of A117567. - Paul Barry, Mar 29 2006
First differences of A156040. - Bob Selcoe, Feb 07 2014
Also first difference of diagonal sums of the triangle formed by rows T(2,k) k=0,1...,2m of ascending m-nomial triangles (see A004737). - Bob Selcoe, Feb 07 2014

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x^2)/((1-x^2)(1-x^3)),{x,0,100}],x] (* or *) LinearRecurrence[{0,1,1,0,-1},{1,0,2,1,2},100] (* Harvey P. Dale, Dec 10 2024 *)
  • PARI
    Vec((1+x^2)/((1-x^2)*(1-x^3))+ O(x^80)) \\ Michel Marcus, Nov 26 2019

Formula

From Paul Barry, Mar 29 2006: (Start)
a(n) = a(n-2) + a(n-3) - a(n-5);
a(n) = cos(2*Pi*n/3 + Pi/3)/3 - sqrt(3)*sin(2*Pi*n/3 + Pi/3)/9 + (-1)^n/2 + (2n+3)/6;
a(n) = Sum_{k=0..floor(n/2)} F(L((n-2k+2)/3)) where L(j/p) is the Legendre symbol of j and p. (End)
a(n) = 2*floor(n/2) + floor((n+4)/3) - n. - Ridouane Oudra, Nov 26 2019

A133825 Triangle whose rows are sequences of increasing and decreasing triangular numbers: 1; 1,3,1; 1,3,6,3,1; ... .

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 6, 3, 1, 1, 3, 6, 10, 6, 3, 1, 1, 3, 6, 10, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 28, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 28, 36, 28, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 36, 28, 21, 15, 10, 6, 3, 1, 1, 3, 6, 10
Offset: 0

Views

Author

Peter Bala, Sep 25 2007

Keywords

Comments

Reading the triangle by rows produces the sequence 1,1,3,1,1,3,6,3,1,..., analogous to A004737.
T(n,k) = min(n*(n+1)/2,k*(k+1)/2), n, k >0. The order of the list T(n,k) is by sides of squares from T(1,n) to T(n,n), then from T(n,n) to T(n,1). - Boris Putievskiy, Jan 13 2013

Examples

			Triangle starts
  1;
  1, 3, 1;
  1, 3, 6, 3, 1;
  1, 3, 6, 10, 6, 3, 1;
From _Boris Putievskiy_, Jan 13 2013: (Start)
The start of the sequence as table:
  1...1...1...1...1...1...
  1...3...3...3...3...3...
  1...3...6...6...6...6...
  1...3...6..10..10..10...
  1...3...6..10..15..15...
  1...3...6..10..15..21...
  1...3...6..10..15..21...
  . . .
The start of the sequence as triangle array read by rows:
  1,
  1, 3, 1,
  1, 3, 6, 3, 1,
  1, 3, 6, 10, 6, 3, 1,
  1, 3, 6, 10, 15, 10, 6, 3, 1,
  1, 3, 6, 10, 15, 21, 15, 10, 6, 3, 1,
  1, 3, 6, 10, 15, 21, 28, 21, 15, 10, 6, 3, 1,
  . . .
Row number k contains 2*k-1 numbers 1,3,...,k*(k-1)/2,k*(k+1)/2,k*(k-1)/2,...,3,1. (End)
		

Crossrefs

Cf. A000330 (row sums), A004737, A124258, A133826, A106255.

Programs

  • Mathematica
    Module[{nn=10,ac},ac=Accumulate[Range[nn]];Table[Join[Take[ ac,n],Reverse[ Take[ac,n-1]]],{n,nn}]]//Flatten (* Harvey P. Dale, Apr 18 2019 *)

Formula

O.g.f.: (1+qx)/((1-x)(1-qx)^2(1-q^2x)) = 1 + x(1 + 3q + q^2) + x^2(1 + 3q + 6q^2 + 3q^3 + q^4) + ... .
From Boris Putievskiy, Jan 13 2013: (Start)
a(n) = A004737(n)*(A004737(n)+1)/2.
a(n) = z*(z+1)/2, where z = floor(sqrt(n-1)) - |n- floor(sqrt(n-1))^2- floor(sqrt(n-1))-1| +1. (End)
Previous Showing 21-30 of 35 results. Next