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-5 of 5 results.

A002817 Doubly triangular numbers: a(n) = n*(n+1)*(n^2+n+2)/8.

Original entry on oeis.org

0, 1, 6, 21, 55, 120, 231, 406, 666, 1035, 1540, 2211, 3081, 4186, 5565, 7260, 9316, 11781, 14706, 18145, 22155, 26796, 32131, 38226, 45150, 52975, 61776, 71631, 82621, 94830, 108345, 123256, 139656, 157641, 177310, 198765, 222111, 247456, 274911, 304590
Offset: 0

Views

Author

Keywords

Comments

Number of inequivalent ways to color vertices of a square using <= n colors, allowing rotations and reflections. Group is dihedral group D_8 of order 8 with cycle index (1/8)*(x1^4 + 2*x4 + 3*x2^2 + 2*x1^2*x2); setting all x_i = n gives the formula a(n) = (1/8)*(n^4 + 2*n + 3*n^2 + 2*n^3).
Number of semi-magic 3 X 3 squares with a line sum of n-1. That is, 3 X 3 matrices of nonnegative integers such that row sums and column sums are all equal to n-1. - [Gupta, 1968, page 653; Bell, 1970, page 279]. - Peter Bertok (peter(AT)bertok.com), Jan 12 2002. See A005045 for another version.
Also the coefficient h_2 of x^{n-3} in the shelling polynomial h(x)=h_0*x^n-1 + h_1*x^n-2 + h_2*x^n-3 + ... + h_n-1 for the independence complex of the cycle matroid of the complete graph K_n on n vertices (n>=2) - Woong Kook (andrewk(AT)math.uri.edu), Nov 01 2006
If X is an n-set and Y a fixed 3-subset of X then a(n-4) is equal to the number of 5-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
Starting with offset 1 = binomial transform of [1, 5, 10, 9, 3, 0, 0, 0, ...]. - Gary W. Adamson, Aug 05 2009
Starting with "1" = row sums of triangle A178238. - Gary W. Adamson, May 23 2010
The equation n*(n+1)*(n^2 + n + 2)/8 may be arrived at by solving for x in the following equality: (n^2+n)/2 = (sqrt(8x+1)-1)/2. - William A. Tedeschi, Aug 18 2010
Partial sums of A006003. - Jeremy Gardiner, Jun 23 2013
Doubly triangular numbers are revealed in the sums of row sums of Floyd's triangle.
1, 1+5, 1+5+15, ...
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
- Tony Foster III, Nov 14 2015
From Jaroslav Krizek, Mar 04 2017: (Start)
For n>=1; a(n) = sum of the different sums of elements of all the nonempty subsets of the sets of numbers from 1 to n.
Example: for n = 6; nonempty subsets of the set of numbers from 1 to 3: {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}; sums of elements of these subsets: 1, 2, 3, 3, 4, 5, 6; different sums of elements of these subsets: 1, 2, 3, 4, 5, 6; a(3) = (1+2+3+4+5+6) = 21, ... (End)
a(n) is also the number of 4-cycles in the (n+4)-path complement graph. - Eric W. Weisstein, Apr 11 2018

Examples

			G.f. = x + 6*x^2 + 21*x^3 + 55*x^4 + 120*x^5 + 231*x^6 + 406*x^7 + 666*x^8 + ...
		

References

  • A. Björner, The homology and shellability of matroids and geometric lattices, in Matroid Applications (ed. N. White), Encyclopedia of Mathematics and Its Applications, 40, Cambridge Univ. Press 1992.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 124, #25, Q(3,r).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics I, p. 292.

Crossrefs

Cf. A006003 (first differences), A165211 (mod 2).
Multiple triangular: A000217, A064322, A066370.
Cf. A006528 (square colorings).
Cf. A236770 (see crossrefs).
Row n=3 of A257493 and row n=2 of A331436 and A343097.
Cf. A000332.
Cf. A000292 (3-cycle count of \bar P_{n+4}), A060446 (5-cycle count of \bar P_{n+3}), A302695 (6-cycle count of \bar P_{n+5}).

Programs

  • Maple
    A002817 := n->n*(n+1)*(n^2+n+2)/8;
  • Mathematica
    a[ n_] := n (n + 1) (n^2 + n + 2) / 8; (* Michael Somos, Jul 24 2002 *)
    LinearRecurrence[{5,-10,10,-5,1}, {0,1,6,21,55},40] (* Harvey P. Dale, Jul 18 2011 *)
    nn=50;Join[{0},With[{c=(n(n+1))/2},Flatten[Table[Take[Accumulate[Range[ (nn(nn+1))/2]], {c,c}],{n,nn}]]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    {a(n) = n * (n+1) * (n^2 + n + 2) / 8}; /* Michael Somos, Jul 24 2002 */
    
  • PARI
    concat(0, Vec(x*(1+x+x^2)/(1-x)^5 + O(x^50))) \\ Altug Alkan, Nov 15 2015
    
  • Python
    def A002817(n): return (m:=n*(n+1))*(m+2)>>3 # Chai Wah Wu, Aug 30 2024

Formula

a(n) = 3*binomial(n+2, 4) + binomial(n+1, 2).
G.f.: x*(1 + x + x^2)/(1-x)^5. - Simon Plouffe (in his 1992 dissertation); edited by N. J. A. Sloane, May 13 2008
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 3. - Warut Roonguthai, Dec 13 1999
a(n) = 5a(n-1) - 10a(n-2) + 10a(n-3) - 5a(n-4) + a(n-5) = A000217(A000217(n)). - Ant King, Nov 18 2010
a(n) = Sum(Sum(1 + Sum(3*n))). - Xavier Acloque, Jan 21 2003
a(n) = A000332(n+1) + A000332(n+2) + A000332(n+3), with A000332(n) = binomial(n, 4). - Mitch Harris, Oct 17 2006 and Bruce J. Nicholson, Oct 22 2017
a(n) = Sum_{i=1..C(n,2)} i = C(C(n,2) + 1, 2) = A000217(A000217(n+1)). - Enrique Pérez Herrero, Jun 11 2012
Euler transform of length 3 sequence [6, 0, -1]. - Michael Somos, Nov 19 2015
E.g.f.: x*(8 + 16*x + 8*x^2 + x^3)*exp(x)/8. - Ilya Gutkovskiy, Apr 26 2016
Sum_{n>=1} 1/a(n) = 6 - 4*Pi*tanh(sqrt(7)*Pi/2)/sqrt(7) = 1.25269064911978447... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A000217(n)*A000124(n)/2.
a(n) = ((n-1)^4 + 3*(n-1)^3 + 2*(n-1)^2 + 2*n))/8. - Bruce J. Nicholson, Apr 05 2017
a(n) = (A016754(n)+ A007204(n)- 2) / 32. - Bruce J. Nicholson, Apr 14 2017
a(n) = a(-1-n) for all n in Z. - Michael Somos, Apr 17 2017
a(n) = T(T(n)) where T are the triangular numbers A000217. - Albert Renshaw, Jan 05 2020
a(n) = 2*n^2 - n + 6*binomial(n, 3) + 3*binomial(n, 4). - Ryan Jean, Mar 20 2021
a(n) = (A008514(n) - 1)/16. - Charlie Marion, Dec 20 2024

Extensions

More terms from Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 29 1999

A066370 Quadruply triangular numbers.

Original entry on oeis.org

0, 1, 231, 26796, 1186570, 26357430, 359026206, 3413156131, 24666759216, 143717956515, 703974775735, 2989908659661, 11270904497931, 38398515291136, 119929709686710, 347357071281165, 941718655098991, 2408309883851256, 5847191602173306, 13551450210950905
Offset: 0

Views

Author

Brian Bayerle (bbayer03(AT)providence.edu), Dec 22 2001

Keywords

Comments

See sequences A000217, A002817 and A064322 for triangular, doubly triangular and triply triangular numbers, respectively.

Examples

			a(2)=231 as A000217(A000217(A000217(A000217(2))))=231 is the second quadruply-triangular number.
		

Programs

  • Mathematica
    f[n_] := n(n + 1)/2; Table[ Nest[f, n, 4], {n, 0, 17}] (* Robert G. Wilson v, Jun 30 2004 *)

Formula

a(n) = n*(n + 1)*(n^2 + n + 2)*(n^4 + 2*n^3 + 3*n^2 + 2*n + 8)*(n^8 + 4*n^7 + 10*n^6 + 16*n^5 + 25*n^4 + 28*n^3 + 28*n^2 + 16*n + 128)/32768.
a(n) = A064322(n)*(A064322(n) + 1)/2 = A000217(A000217(A000217(A000217(n)))).

A285356 Numbers n such that the entries in the n-th row of the irregular triangle A237591 are in nonincreasing order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 30, 31, 32, 36, 37, 38, 40, 41, 45, 46, 47, 48, 51, 55, 57, 58, 59, 66, 67, 70, 71, 78, 79, 80, 84, 92, 93, 94, 108, 109, 120, 136, 137, 155
Offset: 1

Views

Author

Hartmut F. W. Hoft, Apr 17 2017

Keywords

Comments

For the numbers n in the sequence the lengths of the steps in the (first half of the) associated Dyck path of A237593 are nonincreasing.
Conjectures:
(1) The sequence consists of the 59 numbers listed above; tested through 5000000.
(2) The values f(n,k) in the n-th row of triangle A237591 are either 1 or 2 for all k with ceiling((sqrt(4*n+1)-1)/2) <= k <= floor((sqrt(8*n+1)-1)/2) = r(n), the length of the n-th row, though the lower bound need not be minimal; tested through 2500000.
(3) For every n > 155 there is an inversion 1 = f(n,k-1) < f(n,k) = 2 where k >= ceiling((sqrt(4*n+1)-1)/2, except the inversions for n = 174 at k = 12 and for n = 231 at k = 14; tested through 2500000.
(4) For all n > 231 = A066370(2), the position of the rightmost inversion in the n-th row is given by the formula r(n) - r( Binomial( r(n) + 2, 2) - 1 - n); tested through 2500000. Expressed in terms of A-numbers the formula is: A003056(n) - A003056(A000217(A003056(n) + 1) - 1 - n).

Examples

			19 is in the sequence since row 19 in A237591 is 10, 4, 2, 2, 1.
20 is not in the sequence since row 20 in A237591 is 11, 4, 2, 1, 2.
		

Crossrefs

Programs

  • Mathematica
    (* functions row[] and f[] are defined in A237591 *)
    nonincreasingQ[n_] := Module[{i=2, b=row[n], good=True}, While[good && i<=b, good=good && (f[n, i]<=f[n, i-1]); i++]; good]
    a285356[m_, n_] := Module[{i, sols={}}, For[i=m, i<=n, i++, If[nonincreasingQ[i], AppendTo[sols, i]]]; sols]
    a285356[1,200] (* data *)
  • Python
    import math
    from sympy import sqrt
    def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2))
    def isok(n):
        l = [T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]
        for i in range(len(l) - 1):
            if l[i + 1] > l[i]: return 0
        return 1
    print([n for n in range(1, 156) if isok(n)]) # Indranil Ghosh, Apr 20 2017

A094311 a(n) = n*(1+n^2)*((2+n^2)^2-n^2)/16.

Original entry on oeis.org

1, 20, 210, 1309, 5720, 19536, 55825, 139490, 314019, 650440, 1258796, 2302455, 4015570, 6724004, 10870035, 17041156, 26003285, 38738700, 56489014, 80803505, 113593116, 157190440, 214416005, 288651174, 383917975, 504966176, 657367920, 847620235, 1083255734
Offset: 1

Views

Author

Amarnath Murthy, Apr 29 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n(1+n^2)((2+n^2)^2-n^2)/16,{n,30}] (* or *) LinearRecurrence[ {8,-28,56,-70,56,-28,8,-1},{1,20,210,1309,5720,19536,55825,139490},30] (* Harvey P. Dale, Oct 17 2011 *)

Formula

From Harvey P. Dale, Oct 17 2011: (Start)
a(1)=1, a(2)=20, a(3)=210, a(4)=1309, a(5)=5720, a(6)=19536, a(7)=55825, a(8)=139490, a(n) = 8*a(n-1) - 28*a(n-2) + 56*a(n-3) - 70*a(n-4) + 56*a(n-5) - 28*a(n-6) + 8*a(n-7) - a(n-8).
G.f.: (x*(x+1)*(x*(x*(x*(x+11)+67)+66)+12)+1)/(x-1)^8. (End)
a(n) = A064322(n) - A064322(n-1). - J.S. Seneschal, Jun 27 2025

Extensions

Edited by N. J. A. Sloane following a suggestion from Zak Seidov, Mar 28 2008

A096662 Least nontrivial n-tuply triangular number.

Original entry on oeis.org

3, 6, 21, 231, 26796, 359026206, 64449908476890321, 2076895351339769460477611370186681, 2156747150208372213435450937462082366919951682912789656986079991221
Offset: 1

Views

Author

Robert G. Wilson v, Jul 02 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := n(n + 1)/2; Table[ Nest[f, 2, n], {n, 10}]

Formula

a(n)=A007501(n). [From R. J. Mathar, Sep 04 2008]
Showing 1-5 of 5 results.