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

A226048 Irregular triangle read by rows: T(n,k) is the number of binary pattern classes in the (2,n)-rectangular grid with k '1's and (2n-k) '0's: two patterns are in same class if one of them can be obtained by a reflection or 180-degree rotation of the other.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 6, 6, 6, 2, 1, 1, 2, 10, 14, 22, 14, 10, 2, 1, 1, 3, 15, 32, 60, 66, 60, 32, 15, 3, 1, 1, 3, 21, 55, 135, 198, 246, 198, 135, 55, 21, 3, 1, 1, 4, 28, 94, 266, 508, 777, 868, 777, 508, 266, 94, 28, 4, 1, 1, 4, 36
Offset: 0

Views

Author

Yosu Yurramendi, May 24 2013

Keywords

Comments

Sum of rows (see example) gives A225826.
This triangle is to A225826 as Losanitsch's triangle A034851 is to A005418.
By columns:
T(n,1) is A004526.
T(n,2) is A000217.
T(n,3) is A225972.
T(n,4) is A071239.
T(n,5) is A222715.
T(n,6) is A228581.
T(n,7) is A228582.
T(n,8) is A228583.
Also the number of equivalence classes of ways of placing k 1 X 1 tiles in an n X 2 rectangle under all symmetry operations of the rectangle. - Christopher Hunt Gribble, Feb 16 2014

Examples

			n\k 0 1  2   3   4   5   6   7   8   9  10 11 12 13 14
0   1
1   1 1  1
2   1 1  3   1   1
3   1 2  6   6   6   2   1
4   1 2 10  14  22  14  10   2   1
5   1 3 15  32  60  66  60  32  15   3   1
6   1 3 21  55 135 198 246 198 135  55  21  3  1
7   1 4 28  94 266 508 777 868 777 508 266 94 28  4  1
8   1 4 36 140...
...
The length of row n is 2*n+1, so n>= floor((k+1)/2).
		

Crossrefs

Programs

  • Maple
    A226048 := proc(n,k)
        if type(k,'even') then
            binomial(2*n,k) +3*binomial(n,k/2) ;
        else
            binomial(2*n,k) +(1-(-1)^n)*binomial(n-1,(k-1)/2) ;
        end if ;
        %/4 ;
    end proc:
    seq(seq(A226048(n,k),k=0..2*n),n=0..8) ; # R. J. Mathar, Jun 07 2020
  • Mathematica
    T[n_, k_] := If[EvenQ[k],
       Binomial[2n, k] + 3 Binomial[n, k/2],
       Binomial[2n, k] + (1-(-1)^n) Binomial[n-1, (k-1)/2]]/4;
    Table[T[n, k], {n, 0, 8}, { k, 0, 2n}] // Flatten (* Jean-François Alcover, May 05 2023 *)

Formula

If k even, 4*T(n,k) = binomial(2*n,k) +3*binomial(n,k/2). - Yosu Yurramendi, María Merino, Aug 25 2013
If k odd, 4*T(n,k) = 4*T(n,k) = binomial(2*n,k) +(1-(-1)^n)*binomial(n-1,(k-1)/2). - Yosu Yurramendi, María Merino, Aug 25 2013 [corrected by Christian Barrientos, Jun 14 2018]

Extensions

Definition corrected by María Merino, May 19 2017

A229774 T(n,k)=Number of n X n 0..k arrays with rows in lexicographically nondecreasing order and columns in nonincreasing order.

Original entry on oeis.org

2, 3, 6, 4, 22, 20, 5, 60, 322, 70, 6, 135, 3232, 12958, 252, 7, 266, 21331, 1058494, 2179956, 924, 8, 476, 103222, 35452250, 3062815568, 1976588468, 3432, 9, 792, 397460, 637396928, 843211336888, 90462380211862, 10811999412826, 12870, 10
Offset: 1

Views

Author

R. H. Hardin, Sep 29 2013

Keywords

Comments

Table starts
...2..........3..............4..................5.....................6
...6.........22.............60................135...................266
..20........322...........3232..............21331................103222
..70......12958........1058494...........35452250.............637396928
.252....2179956.....3062815568.......843211336888........81937334158292
.924.1976588468.90462380211862.322942973130396495.245200063296427870294

Examples

			Some solutions for n=3 k=4
..2..2..0....3..3..3....2..1..1....1..0..0....1..1..0....2..0..0....2..2..2
..3..0..0....4..0..0....3..0..0....1..3..0....3..0..3....2..2..2....3..3..1
..4..3..3....4..2..0....3..4..4....2..4..1....4..4..1....2..2..2....4..4..0
		

Crossrefs

Column 1 is A000984
Row 1 is A000027(n+1)
Row 2 is A071239(n+1)

Formula

Empirical for row n:
n=1: a(n) = n + 1
n=2: a(n) = (1/6)*n^4 + (5/6)*n^3 + (11/6)*n^2 + (13/6)*n + 1
n=3: [polynomial of degree 9]
n=4: [polynomial of degree 16]

A174723 a(n) = n*(4*n^2 - 3*n + 5)/6.

Original entry on oeis.org

1, 5, 16, 38, 75, 131, 210, 316, 453, 625, 836, 1090, 1391, 1743, 2150, 2616, 3145, 3741, 4408, 5150, 5971, 6875, 7866, 8948, 10125, 11401, 12780, 14266, 15863, 17575, 19406, 21360, 23441, 25653, 28000, 30486, 33115, 35891, 38818, 41900, 45141
Offset: 1

Views

Author

Michel Lagneau, Mar 28 2010

Keywords

Comments

We prove that a(n) = Sum_{k=1..n^2} floor(sqrt(k)): a(n) = Sum_{k=1..3} 1 + Sum_{k=4..8} 2 + ... + Sum_{k=(n-1)^2..n^2 - 1} (n-1) + n = 3*1 + 5*2 + 7*3 + ... + (2n-1)(n-1)+ n = Sum_{k=1..n} (2k-1)*(k-1) + n = 2*Sum_{k=1..n} k^2 - 3*Sum_{k=1..n} k + 2n = 2n(n+1)(2n+1)/6 - 3n(n+1)/2 + 2n = n*(4n^2 - 3n + 5) / 6.
Notice that a(4) = 4 + 3*5 + 2*6 + 1*7 and a(8) = 8 + 7*9 + 6*10 + 5*11 + 4*12 + 3*13 + 2*14 + 1*15. In general, a(n) = n + Sum_{k=1..n-1} (n-k)*(n+k). - J. M. Bergot, Jul 31 2013

Examples

			From _Bruno Berselli_, Feb 17 2015: (Start)
Third differences:  1, 2,  4,  4,   4,   4,   4, (repeat 4) ... (A151798)
Second differences: 1, 3,  7, 11,  15,  19,  23,  27,   31, ... (A131098)
First differences:  1, 4, 11, 22,  37,  56,  79, 106,  137, ... (A084849)
-------------------------------------------------------------------------
This sequence:      1, 5, 16, 38,  75, 131, 210, 316,  453, ...
-------------------------------------------------------------------------
Partial sums:       1, 6, 22, 60, 135, 266, 476, 792, 1245, ... (A071239)
(End)
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 3rd ed., Oxford Univ. Press, 1954.

Crossrefs

Programs

  • Magma
    I:=[1, 5, 16, 38]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jul 04 2012
    
  • Maple
    A174723 := proc(n)
            n*(4*n^2-3*n+5)/6 ;
    end proc:
    seq( A174723(n),n=1..20) ; # R. J. Mathar, Nov 07 2011
  • Mathematica
    Table[n (4n^2-3n+5)/6,{n,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{1,5,16,38},50] (* Harvey P. Dale, Jan 16 2012 *)
  • PARI
    a(n)=n*(4*n^2-3*n+5)/6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f. x*(1 + x + 2*x^2) / (x-1)^4. - R. J. Mathar, Nov 07 2011
a(1)=1, a(2)=5, a(3)=16, a(4)=38; for n > 4, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Jan 16 2012
a(n) = A022554(n^2). - Ridouane Oudra, Jun 13 2025

A014370 If n = binomial(b,2) + binomial(c,1), b > c >= 0 then a(n) = binomial(b+1,3) + binomial(c+1,2).

Original entry on oeis.org

1, 2, 4, 5, 7, 10, 11, 13, 16, 20, 21, 23, 26, 30, 35, 36, 38, 41, 45, 50, 56, 57, 59, 62, 66, 71, 77, 84, 85, 87, 90, 94, 99, 105, 112, 120, 121, 123, 126, 130, 135, 141, 148, 156, 165, 166, 168, 171, 175, 180, 186, 193, 201, 210, 220, 221, 223, 226, 230, 235, 241, 248, 256, 265, 275, 286
Offset: 1

Views

Author

Keywords

Examples

			The triangle starts:
  1
  2 4
  5 7 10
  11 13 16 20
  21 23 26 30 35
		

References

  • W. Bruns and J. Herzog, Cohen-Macaulay Rings, Cambridge, 1993, p. 159.

Crossrefs

Cf. A002260, A000292 (main diagonal), A000217, A014368, A014369, A006046, A050407 (1st column), A005581 (subdiagonal), A071239 (row sums), A212013.

Programs

  • Maple
    a := 0: for i from 1 to 15 do for j from 1 to i do a := a+j: printf(`%d,`,a); od:od:
  • Mathematica
    A014370[n_, k_] := Binomial[n + 1, 3] + Binomial[k + 1, 2];
    Table[A014370[n, k], {n, 12}, {k, n}] (* Paolo Xausa, Mar 11 2025 *)

Formula

a(n) = Sum_{m = 1..n} b(m), b(m) = 1,1,2,1,2,3,1,2,3,4,... = A002260. - Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)
a(n*(n+1)/2+m) = n*(n+1)*(n+2)/6 + m*(m+1)/2 = A000292(n)+ A000217(m), m = 0...n+1, n = 1, 2, 3.. - Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)
a(n) = a(n-1) + A002260(n). As a triangle with n >= k >= 1: a(n, k) = a(n-1, k) + (n-1)*n/2 = a(n, k-1) + k = (n^3-n+3k^2+3k)/6. - Henry Bottomley, Nov 14 2001
a(n) = b(n) * (b(n) + 1) * (b(n) + 2) / 6 + c(n) * (c(n) + 1) / 2, where b(n) = [sqrt(2 * n) - 1/2] and c(n) = n - b(n) * (b(n) + 1) / 2. - Robert A. Stump (bee_ess107(AT)msn.com), Sep 20 2002
As a triangle, T(n,k) = binomial(n+1, 3) + binomial(k+1,2). - Franklin T. Adams-Watters, Jan 27 2014

Extensions

More terms from James Sellers, Feb 05 2000

A248059 Table T(n,k), n>=1, k>=1, read by antidiagonals: T(n,k) = number of equivalence classes of ways of placing four 1 X 1 tiles in an n X k rectangle under all symmetry operations of the rectangle.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 6, 6, 1, 3, 22, 39, 22, 3, 9, 60, 139, 139, 60, 9, 19, 135, 371, 476, 371, 135, 19, 38, 266, 813, 1253, 1253, 813, 266, 38, 66, 476, 1574, 2706, 3254, 2706, 1574, 476, 66, 110, 792, 2770, 5199, 6969, 6969, 5199, 2770, 792, 110, 170, 1245
Offset: 1

Views

Author

Keywords

Examples

			T(n,k) for 1<=n<=9 and 1<=k<=9 is:
   k    1      2      3      4      5      6      7      8       9 ...
n
1       0      0      0      1      3      9     19     38      66
2       0      1      6     22     60    135    266    476     792
3       0      6     39    139    371    813   1574   2770    4554
4       1     22    139    476   1253   2706   5199   9080   14857
5       3     60    371   1253   3254   6969  13294  23102   37637
6       9    135    813   2706   6969  14841  28197  48852   79401
7      19    266   1574   5199  13294  28197  53381  92266  149645
8      38    476   2770   9080  23102  48852  92266 159216  257878
9      66    792   4554  14857  37637  79401 149645 257878  417156
		

Crossrefs

Programs

  • Maple
    b := proc (n::integer, k::integer)::integer;
    (4*k^4*n^4 - 24*k^3*n^3 + 2*k^4 + 12*k^3*n + 80*k^2*n^2 + 12*k*n^3 + 2*n^4 - 24*k^3 - 24*k^2*n - 24*k*n^2 - 24*n^3 + 40*k^2 - 102*k*n + 40*n^2 + 9 + (- 2*k^4 - 12*k^3*n + 24*k^3 + 24*k^2*n - 40*k^2 + 6*k*n - 9)*(-1)^n + (- 12*k*n^3 - 2*n^4 + 24*k*n^2 + 24*n^3 + 6*k*n - 40*n^2 - 9)*(-1)^k + (- 6*k*n + 9)*(-1)^k*(-1)^n)/384
    end proc;
    seq(seq(b(n, k-n+1), n = 1 .. k), k = 1 .. 140);

Formula

Empirically,
T(n,k) = (4*k^4*n^4 - 24*k^3*n^3 + 2*k^4 + 12*k^3*n + 80*k^2*n^2 + 12*k*n^3 + 2*n^4 - 24*k^3 - 24*k^2*n - 24*k*n^2 - 24*n^3 + 40*k^2 - 102*k*n + 40*n^2 + 9 + (- 2*k^4 - 12*k^3*n + 24*k^3 + 24*k^2*n - 40*k^2 + 6*k*n - 9)*(-1)^n + (- 12*k*n^3 - 2*n^4 + 24*k*n^2 + 24*n^3 + 6*k*n - 40*n^2 - 9)*(-1)^k + (- 6*k*n + 9)*(-1)^k*(-1)^n)/384;
T(1,k) = sum(A005993(i-4),i=1,k)
= sum((i-2)*(2*(i-3)*(i-1) + 3*(1-(-1)^(i-1)))/24, i=1,k);
T(2,k) = A071239(k-1) = (k-1)*k*((k-1)^2+2)/6.

Extensions

Terms corrected and extended by Christopher Hunt Gribble, Apr 06 2015

A071244 a(n) = n*(n-1)*(n^2 + 2)/6.

Original entry on oeis.org

0, 0, 2, 11, 36, 90, 190, 357, 616, 996, 1530, 2255, 3212, 4446, 6006, 7945, 10320, 13192, 16626, 20691, 25460, 31010, 37422, 44781, 53176, 62700, 73450, 85527, 99036, 114086, 130790, 149265, 169632, 192016, 216546, 243355, 272580, 304362, 338846, 376181
Offset: 0

Views

Author

N. J. A. Sloane, Jun 12 2002

Keywords

References

  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

Crossrefs

Cf. A071239.

Programs

  • Magma
    [n*(n-1)*(n^2+2)/6: n in [0..40]]; // Vincenzo Librandi, Jun 14 2011
    
  • Mathematica
    Table[n(n-1)(n^2+2)/6,{n,0,50}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,0,2,11,36},50] (* Harvey P. Dale, Nov 27 2022 *)
  • PARI
    a(n)=n*(n-1)*(n^2+2)/6; \\ Joerg Arndt, Sep 04 2013
    
  • SageMath
    def A071244(n): return binomial(n,2)*(n^2+2)//3
    [A071244(n) for n in range(41)] # G. C. Greubel, Aug 06 2024

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4, a(0)=0, a(1)=0, a(2)=2, a(3)=11, a(4)=36. - Yosu Yurramendi, Sep 03 2013
From G. C. Greubel, Aug 06 2024: (Start)
G.f.: x^2*(2 + x + x^2)/(1 - x)^5.
E.g.f.: (1/6)*x^2*(6 + 5*x + x^2)*exp(x). (End)

A071246 a(n) = n*(n - 1)*(2*n^2 + n + 2)/6.

Original entry on oeis.org

0, 0, 4, 23, 76, 190, 400, 749, 1288, 2076, 3180, 4675, 6644, 9178, 12376, 16345, 21200, 27064, 34068, 42351, 52060, 63350, 76384, 91333, 108376, 127700, 149500, 173979, 201348, 231826, 265640, 303025, 344224, 389488, 439076, 493255, 552300, 616494
Offset: 0

Views

Author

N. J. A. Sloane, Jun 12 2002

Keywords

References

  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

Crossrefs

Programs

  • Magma
    [n*(n-1)*(2*n^2+n+2)/6: n in [0..40]]; // Vincenzo Librandi, Jun 14 2011
    
  • Mathematica
    CoefficientList[Series[-(4x^2 + 3x^3 + x^4)/(x - 1)^5, {x, 0, 50}], x] (* or *) Table[n*(n - 1)*(2*n^2 + n + 2)/6, {n, 0, 50}] (* Indranil Ghosh, Apr 05 2017 *)
  • PARI
    a(n) = n*(n - 1)*(2*n^2 + n + 2)/6; \\ Indranil Ghosh, Apr 05 2017
    
  • Python
    def a(n): return n*(n - 1)*(2*n**2 + n + 2)/6 # Indranil Ghosh, Apr 05 2017
    
  • SageMath
    def A071246(n): return binomial(n,2)*(2+n+2*n^2)//3
    [A071246(n) for n in range(41)] # G. C. Greubel, Aug 07 2024

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4, a(0)=0, a(1)=0, a(2)=4, a(3)=23, a(4)=76. - Yosu Yurramendi, Sep 03 2013
From Indranil Ghosh, Apr 05 2017: (Start)
G.f.: x^2*(4 + 3*x + x^2)/(1 - x)^5.
E.g.f.: exp(x)*x^2*(4+x)*(3+2*x)/6. (End)

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

Original entry on oeis.org

0, 0, 5, 30, 102, 260, 555, 1050, 1820, 2952, 4545, 6710, 9570, 13260, 17927, 23730, 30840, 39440, 49725, 61902, 76190, 92820, 112035, 134090, 159252, 187800, 220025, 256230, 296730, 341852, 391935, 447330, 508400, 575520, 649077, 729470, 817110, 912420
Offset: 0

Views

Author

N. J. A. Sloane, Jun 12 2002

Keywords

References

  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

Crossrefs

Programs

  • Magma
    [n*(n-1)*(n^2+1)/2: n in [0..40]]; // Vincenzo Librandi, Jun 14 2011
    
  • Mathematica
    f[n_] := n (n - 1) (n^2 + 1)/2 (* Or *) f[n_] := Floor[n^5/(n + 1)]/2; Array[f, 38, 0] (* Robert G. Wilson v, Apr 01 2012 *)
  • PARI
    a(n)=n*(n-1)*(n^2+1)/2; \\ Joerg Arndt, Sep 04 2013
    
  • Python
    def a(n): return  n*(n - 1)*(n**2 + 1)/2 # Indranil Ghosh, Apr 05 2017
    
  • SageMath
    def A071252(n): return binomial(n,2)*(1+n^2)
    [A071252(n) for n in range(41)] # G. C. Greubel, Aug 07 2024

Formula

a(n) = floor(n^5/(n+1))/2. - Gary Detlefs, Mar 31 2011
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) n>4, a(0)=0, a(1)=0, a(2)=5, a(3)=30, a(4)=102. - Yosu Yurramendi, Sep 03 2013
G.f.: x^2*(5+5*x+2*x^2)/(1-x)^5. - Joerg Arndt, Sep 04 2013
From Indranil Ghosh, Apr 05 2017: (Start)
a(n) = A002378(n) * A002522(n) / 2.
E.g.f.: exp(x)*x^2*(5 + 5*x + x^2)/2.
(End)
Showing 1-8 of 8 results.