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

A002717 a(n) = floor(n(n+2)(2n+1)/8).

Original entry on oeis.org

0, 1, 5, 13, 27, 48, 78, 118, 170, 235, 315, 411, 525, 658, 812, 988, 1188, 1413, 1665, 1945, 2255, 2596, 2970, 3378, 3822, 4303, 4823, 5383, 5985, 6630, 7320, 8056, 8840, 9673, 10557, 11493, 12483, 13528, 14630, 15790, 17010, 18291, 19635, 21043, 22517, 24058
Offset: 0

Views

Author

Keywords

Comments

Number of triangles in triangular matchstick arrangement of side n, for n >= 1. Row sums of A085691.
We observe that the sequence is the transform of A006578 by the following transform T: T(u_0,u_1,u_2,u_3,...)=(u_0,u_0+u_1, u_0+u_1+u_2, u_0+u_1+u_2+u_3+u_4,...). In another terms v_p=sum(u_k,k=0..p) and the G.f phi_v of v is given by: phi_v=phi_u/(1-z). - Richard Choulet, Jan 28 2010
Row sums of A220053, for n > 0. - Reinhard Zumkeller, Dec 03 2012
a(n) has the expansion (1*0)+(1*1)+(4*1)+(4*2)+(7*2)+(7*3)+..., where the expansion stops when a(n) has n+1 number of terms. The expansion starts at (1*0), and progresses by alternating addition of 1 to the second number and 3 to the first number. - Arlu Genesis A. Padilla, Jun 04 2014
Taking the absolute values of each n-th difference and excluding the first n terms of each mentioned sequence, A002717 has the first difference A006578 (see formula of Michael Somos dated Jun 09 2014), the second difference A032766 (see 'partial sum' crossref), the third difference A000034, the fourth difference A000012, and the fifth to n-th difference A000004. - Arlu Genesis A. Padilla, Jun 12 2014

Examples

			f(3)=13 because the following figure contains 13 triangles if horizontal bars are added:
....... /\
...... /\/\
..... /\/\/\
G.f. = x + 5*x^2 + 13*x^3 + 27*x^4 + 48*x^5 + 78*x^6 + 118*x^7 + 170*x^8 + ...
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, p. 83.
  • 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).

Crossrefs

Cf. A000292 number of triangles with same orientation as largest triangle, A002623 number of triangles pointing in opposite direction to largest triangle, A085691 number of triangles of side k in arrangement of side n.
Bisections: A135712 (odd part), A135713 (even part).

Programs

  • Magma
    [Floor(n*(n+2)*(2*n+1)/8): n in [0..50]]; // Wesley Ivan Hurt, Jun 04 2014
  • Maple
    A002717:=n->floor(n*(n+2)*(2*n+1)/8); seq(A002717(n), n=0..100);
  • Mathematica
    Table[Floor[n(n+2)(2n+1)/8],{n,0,50}] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{0,1,5,13,27},50] (* Harvey P. Dale, Jan 20 2013 *)
  • PARI
    {a(n) = n * (n+2) * (2*n+1) \ 8};
    

Formula

a(n) = (1/16)*[2n(2n+1)(n+2)+cos(Pi*n)-1]. - Justin C. Bozonier (justinb67(AT)excite.com), Dec 05 2000
a(m+1)-2a(m)+2a(m-2)-a(m-3) = 3. - Len Smiley, Oct 08 2001
a(n) = (2n(2n+1)(n+2)+(-1)^n-1)/16. - Wesley Petty (Wesley.Petty(AT)mail.tamucc.edu), Oct 25 2003
a(n) = A000292(n-1) + A002623(n-2). - Hugo Pfoertner, Mar 06 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*k*binomial(k+1,2).
G.f.: x(1+2x)/((1+x)(1-x)^4). - Simon Plouffe in his 1992 dissertation (with a different offset).
a(0)=0, a(1)=1, a(2)=5, a(3)=13, a(4)=27, a(n)=3*a(n-1)-2*a(n-2)-2*a(n-3)+ 3*a(n-4)- a(n-5). - Harvey P. Dale, Jan 20 2013
a(n) = a(n-1) + A016777(floor(0.5*n))*floor(0.5+0.5*n). - Arlu Genesis A. Padilla, Jun 04 2014
a(-n) = - A045947(n). a(n) = a(n-1) + A006578(n). - Michael Somos, Jun 09 2014
a(n) = Sum_{i=1..n} T(n-i+1)+T(n-2*i+1), where T(n)=n*(n+1)/2=A000217(n) if n>0 and 0 if n<=0. So we have a(n+2)-a(n)=(n+2)^2+(n+1)*(n+2)/2. - Maurice Mischler, Sep 08 2014
E.g.f.: (x*(2*x^2 + 11*x + 9)*cosh(x) + (2*x^3 + 11*x^2 + 9*x - 1)*sinh(x))/8. - Stefano Spezia, Jul 19 2022

A001859 Triangular numbers plus quarter-squares: n*(n+1)/2 + floor((n+1)^2/4) (i.e., A000217(n) + A002620(n+1)).

Original entry on oeis.org

0, 2, 5, 10, 16, 24, 33, 44, 56, 70, 85, 102, 120, 140, 161, 184, 208, 234, 261, 290, 320, 352, 385, 420, 456, 494, 533, 574, 616, 660, 705, 752, 800, 850, 901, 954, 1008, 1064, 1121, 1180, 1240, 1302, 1365, 1430, 1496, 1564, 1633, 1704, 1776, 1850, 1925
Offset: 0

Views

Author

Keywords

Comments

Number of series-reduced planted trees with n+7 nodes and 3 internal nodes.
The trees enumerated with 3 internal nodes are of two types. Those with all internal nodes at different heights are enumerated by the triangular numbers. Those with two internal nodes at the same height are enumerated by the quarter squares. - Michael Somos, May 19 2000
Number of pairs (x,y) with x in {0,...,n}, y even in {0,...,2n}, and x < y. - Clark Kimberling, Jul 02 2012

Examples

			For n=1 we find 2 planted trees with 8 nodes, 3 of which are internal (i) and 5 are endpoints (e):
.e...e...e...e....e...e....
...i.......i........i...e..
.......i..............i...e
.......e................i..
........................e..
G.f. = 2*x + 5*x^2 + 10*x^3 + 16*x^4 + 24*x^5 + 33*x^6 + 44*x^7 + 56*x^8 + ...
		

References

  • John Riordan, personal communication.
  • 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).

Crossrefs

First differences of A045947.
Antidiagonal sums of array A003984.
Cf. A185212 (odd terms).

Programs

  • Haskell
    a001859 n = a000217 n + a002620 (n + 1)  -- Reinhard Zumkeller, Dec 20 2012
  • Maple
    A001859:=(-1-z^2-2*z^3+z^4)/(z+1)/(z-1)^3; # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence with an additional leading 1
    with (combinat):seq(count(Partition((3*n+2)), size=3), n=0..50); # Zerinvary Lajos, Mar 28 2008
  • Mathematica
    With[{nn=60},Total/@Thread[{Accumulate[Range[0,nn]],Floor[Range[ nn+1]^2/4]}]] (* or *) LinearRecurrence[{2,0,-2,1},{0,2,5,10},60] (* Harvey P. Dale, Apr 01 2012 *)
  • PARI
    {a(n) = n + (3*n^2 + 1) \ 4};
    

Formula

a(n) = A000217(n)+A002620(n+1).
a(n) = n + floor( (3n^2+1)/4 ).
G.f.: (2*x+x^2)/((1-x)^2*(1-x^2)).
a(n) = a(n-1) + a(n-2) - a(n-3) + 3 = A002378(n) - A002620(n) = A006578(n-1) + A004526(n+1) - Henry Bottomley, Mar 08 2000
a(n) = A006578(-1-n) for all n in Z. - Michael Somos, May 10 2006
From Mitch Harris, Aug 22 2006: (Start)
a(n) = (6n^2 + 8n + 1 - (-1)^n)/8;
a(n) = Sum_{k=0..n} max(k, n-k). (End)
Starting (2, 5, 10, 16, 24, ...), = binomial transform of [2, 3, 2, -1, 2, -4, 8, -16, 32, ...]. - Gary W. Adamson, Nov 30 2007
a(0)=0, a(1)=2, a(2)=5, a(3)=10, a(n) = 2*a(n-1) + 0*a(n-2) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Apr 01 2012
a(n) = 3*n*(n+1)/2 - A006578(n). - Clark Kimberling, Jul 02 2012
a(2*n) = A045944(n), a(2*n - 1) = A049450(n) for all n in Z. - Michael Somos, Nov 03 2014
0 = -6 + a(n) - 2*a(n+2) + a(n+4) for all n in Z. - Michael Somos, Nov 03 2014
0 = a(n)*(+a(n+1) - a(n+2)) + a(n+1)*(-3 - a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Nov 03 2014
a(n) = Sum_{k=1..n} floor((n+k+2)/2). - Wesley Ivan Hurt, Mar 31 2017
Sum_{n>=1} 1/a(n) = 3/4 - Pi/(4*sqrt(3)) + 3*log(3)/4. - Amiram Eldar, May 28 2022
E.g.f.: (x*(7 + 3*x)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x))/4. - Stefano Spezia, Aug 22 2023

Extensions

Entry improved by Michael Somos

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

Original entry on oeis.org

0, 1, 13, 58, 170, 395, 791, 1428, 2388, 3765, 5665, 8206, 11518, 15743, 21035, 27560, 35496, 45033, 56373, 69730, 85330, 103411, 124223, 148028, 175100, 205725, 240201, 278838, 321958, 369895, 422995, 481616, 546128, 616913, 694365, 778890
Offset: 0

Views

Author

Lambert Klasen (lambert.klasen(AT)gmx.de) and Gary W. Adamson, Jan 25 2005

Keywords

Comments

Row sums of A103219.
From Bruno Berselli, Dec 10 2010: (Start)
a(n) = n*A002412(n) - Sum_{i=0..n-1} A002412(i). More generally: n^2*(n+1)*(2*d*n-2*d+3)/6 - (Sum_{i=0..n-1} i*(i+1)*(2*d*i-2*d+3))/6 = n * (n+1) * (3*d*n^2-d*n+4*n-2*d+2)/12; in this sequence is d=2.
The inverse binomial transform yields 0, 1, 11, 22, 12, 0, 0 (0 continued). (End)
a(n-1) is also number of ways to place 2 nonattacking semi-queens (see A099152) on an n X n board. - Vaclav Kotesovec, Dec 22 2011
Also, one-half the even-indexed terms of the partial sums of A045947. - J. M. Bergot, Apr 12 2018

Crossrefs

Programs

  • Maple
    for(n=0,100,print1((3*n^4+4*n^3-n)/6,","))
  • Mathematica
    CoefficientList[Series[- x (1 + 8 x + 3 x^2) / (x - 1)^5, {x, 0, 40}], x] (* Vincenzo Librandi, May 12 2013 *)
    LinearRecurrence[{5,-10,10,-5,1},{0,1,13,58,170},40] (* Harvey P. Dale, Jan 23 2016 *)
  • PARI
    a(n)=n*(n+1)*(3*n^2+n-1)/6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: x*(1+8*x+3*x^2)/(1-x)^5.
a(n) = Sum_{i=1..n} Sum_{j=1..n} max(i,j)^2. - Enrique Pérez Herrero, Jan 15 2013
a(n) = a(n-1) + (2*n-1)*n^2 with a(0)=0, see A015237. - J. M. Bergot, Jun 10 2017
From Wesley Ivan Hurt, Nov 20 2021: (Start)
a(n) = Sum_{k=1..n} k * C(2*k,2).
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5). (End)
From Peter Bala, Sep 03 2023: (Start)
a(n) = Sum_{1 <= i <= j <= n} (2*i - 1)*(2*j - 1).
Second subdiagonal of A039755. (End)

A117143 Number of partitions of n in which any two parts differ by at most 3.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 13, 17, 22, 27, 33, 41, 48, 57, 68, 78, 90, 105, 118, 134, 153, 170, 190, 214, 235, 260, 289, 315, 345, 380, 411, 447, 488, 525, 567, 615, 658, 707, 762, 812, 868, 931, 988, 1052, 1123, 1188, 1260, 1340, 1413, 1494, 1583, 1665, 1755, 1854
Offset: 1

Views

Author

Emeric Deutsch, Feb 27 2006

Keywords

Examples

			a(6) = 10 because we have [6], [4,2], [4,1,1], [3,3], [3,2,1], [3,1,1,1], [2,2,2], [2,2,1,1], [2,1,1,1,1] and [1,1,1,1,1,1] ([5,1] does not qualify).
		

Crossrefs

Cf. A117142.
Column k=3 of A194621.

Programs

  • Magma
    [(2*Floor((n+2)/3)*(14*Floor((n+2)/3)^2-(10*n+21)*Floor((n+2)/3)+2*(n^2+5*n+7))-(1-(-1)^Floor((n+2)/3))*(-1)^(n+2-Floor((n+2)/3)))/16: n in [1..60]]; // Vincenzo Librandi, May 12 2015
  • Maple
    g:=sum(x^k/(1-x^k)/(1-x^(k+1))/(1-x^(k+2))/(1-x^(k+3)),k=1..85): gser:=series(g,x=0,65): seq(coeff(gser,x^n),n=1..59); with(combinat): for n from 1 to 7 do P:=partition(n): A:={}: for j from 1 to nops(P) do if P[j][nops(P[j])]-P[j][1]<4 then A:=A union {P[j]} else A:=A fi od: print(A); od: # this program yields the partitions
  • Mathematica
    Table[Count[IntegerPartitions[n], ?(Max[#] - Min[#] <= 3 &)], {n, 30}] (* _Birkas Gyorgy, Feb 20 2011 *)
  • PARI
    Vec(x*(x^5-x^4-x^3+x+1)/((x-1)^4*(x+1)*(x^2+x+1)^2) + O(x^100)) \\ Colin Barker, Mar 05 2015
    

Formula

G.f.: sum(x^k/[(1-x^k)(1-x^(k+1))(1-x^(k+2))(1-x^(k+3))], k=1..infinity). More generally, the g.f. of the number of partitions in which any two parts differ by at most b is sum(x^k/product(1-x^j, j=k..k+b), k=1..infinity).
G.f.: x*(x^5-x^4-x^3+x+1) / ((x-1)^4*(x+1)*(x^2+x+1)^2). - Colin Barker, Mar 05 2015
a(n)=(2*floor((n+2)/3)*(14*floor((n+2)/3)^2-(10*n+21)*floor((n+2)/3)+2*(n^2+5*n+7))-(1-(-1)^floor((n+2)/3))*(-1)^(n+2-floor((n+2)/3)))/16. - Luce ETIENNE, May 12 2015

A200942 T(n,k)=Number of 0..k arrays x(0..n-1) of n elements with nondecreasing average value and 0..k occur with instance counts within one of each other.

Original entry on oeis.org

2, 3, 1, 4, 3, 2, 5, 6, 2, 1, 6, 10, 7, 7, 2, 7, 15, 17, 3, 9, 1, 8, 21, 33, 15, 17, 6, 2, 9, 28, 57, 46, 8, 40, 22, 1, 10, 36, 90, 107, 44, 61, 46, 30, 2, 11, 45, 134, 213, 151, 20, 206, 21, 20, 1, 12, 55, 190, 383, 398, 134, 214, 410, 135, 75, 2, 13, 66, 260, 636, 890, 536, 70, 1055
Offset: 1

Views

Author

R. H. Hardin Nov 24 2011

Keywords

Comments

Table starts
.2..3...4...5....6.....7.....8.....9...10....11.....12......13......14.......15
.1..3...6..10...15....21....28....36...45....55.....66......78......91......105
.2..2...7..17...33....57....90...134..190...260....345.....447.....567......707
.1..7...3..15...46...107...213...383..636...997...1492....2151....3005.....4092
.2..9..17...8...44...151...398...890.1774..3246...5555....9016...14012....21005
.1..6..40..61...20...134...536..1613.4023..8842..17681...32835...57465....95825
.2.22..46.206..214....70...496..2185.7215.19783..47458..102886..206061...386953
.1.30..21.410.1055...906...212..1882.9470.34680.104386..272088..636895..1368860
.2.20.135.426.3020..5719..3748...914.8404.45418.181600..591875.1665229..4181993
.1.75.342.228.5124.22641.31522.18675.3578.38444.232486.1015624.3582100.10821987

Examples

			Some solutions for n=8 k=8
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
..2....1....2....1....1....3....3....1....2....1....1....2....1....1....1....1
..1....2....1....2....8....2....2....2....4....3....7....1....2....3....2....2
..4....3....4....6....3....5....6....6....3....8....3....3....8....4....5....6
..7....8....3....5....6....7....4....4....5....5....8....8....4....2....3....3
..5....7....8....3....5....4....7....3....6....4....5....6....6....7....7....5
..8....6....5....4....4....8....8....5....7....7....4....4....5....5....4....4
..6....5....6....8....7....6....5....8....8....6....6....7....7....6....8....7
		

Crossrefs

Column 2 is A200770
Column 5 is A200895
Column 6 is A200930
Row 2 is A000217
Row 3 is A045947 for n>1

A082289 Expansion of x^4*(2+x)/((1+x)*(1-x)^5).

Original entry on oeis.org

2, 9, 26, 59, 116, 206, 340, 530, 790, 1135, 1582, 2149, 2856, 3724, 4776, 6036, 7530, 9285, 11330, 13695, 16412, 19514, 23036, 27014, 31486, 36491, 42070, 48265, 55120, 62680, 70992, 80104, 90066, 100929, 112746, 125571, 139460, 154470
Offset: 4

Views

Author

Michael Somos, Apr 07 2003

Keywords

Crossrefs

Cf. A045947 (which contains the first differences). - Bruno Berselli, Aug 26 2011

Programs

  • Magma
    [(1/96)*(2*(n-2)*n*(3*n^2-10*n+4)+3*(-1)^n-3): n in [4..50]]; // Vincenzo Librandi, Aug 29 2011
  • Mathematica
    Drop[CoefficientList[Series[x^4(2+x)/((1+x)(1-x)^5),{x,0,50}],x],4] (* or *) LinearRecurrence[{4,-5,0,5,-4,1},{2,9,26,59,116,206},50] (* Harvey P. Dale, Aug 26 2013 *)
  • PARI
    a(n)=polcoeff(if(n>0,x^4*(2+x)/((1+x)*(1-x)^5),x*(1+2*x)/((1+x)*(1-x)^5))+x*O(x^abs(n)),abs(n))
    

Formula

G.f.: x^4*(2+x)/((1+x)*(1-x)^5).
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5) + 3. If sequence is also defined for n <= 3 by this equation, then a(n)=0 for 0 <= n <= 3 and a(n) = A070893(-n) for n < 0.
a(n) = A082290(2*n-7).
a(n) = (1/96)*(2*(n-2)*n*(3*n^2 - 10*n + 4) + 3*(-1)^n - 3). a(n) - a(n-2) = A006002(n-3) for n > 5. - Bruno Berselli, Aug 26 2011
a(n) = 4*a(n-1) - 5*a(n-2) + 5*a(n-4) - 4*a(n-5) + a(n-6); a(4)=2, a(5)=9, a(6)=26, a(7)=59, a(8)=116, a(9)=206. - Harvey P. Dale, Aug 26 2013

A248851 a(n) = ( 2*n*(2*n^2 + 9*n + 14) + (-1)^n - 1 )/16.

Original entry on oeis.org

0, 3, 10, 22, 41, 68, 105, 153, 214, 289, 380, 488, 615, 762, 931, 1123, 1340, 1583, 1854, 2154, 2485, 2848, 3245, 3677, 4146, 4653, 5200, 5788, 6419, 7094, 7815, 8583, 9400, 10267, 11186, 12158, 13185, 14268, 15409, 16609, 17870, 19193, 20580, 22032
Offset: 0

Views

Author

Luce ETIENNE, Mar 03 2015

Keywords

Comments

Consider a grid of small triangles of side 1 forming a regular polygon with side n*(n+2); a(n) is the number of equilateral triangles of side length >= 1 in this figure which are oriented with the sides of the figure.
This sequence gives the number of triangles of all sizes in a (n^2+2*n)-iamond with a 4*n-gon configuration.
Equals (1/2)*Sum_{j=0..n-1} (n-j)*(n+1-j) + (-1 + (1/8)*Sum_{j=0..(2*n+1-(-1)^n)/4} (2*n+3+(-1)^n-4*j)*(2*n+3-(-1)^n-4*j)) numbers of triangles in a direction and in the opposite direction.

Examples

			From third comment: a(0)=0, a(1)=1+2, a(2)=4+6, a(3)=10+12, a(4)=20+21, a(5)=35+33.
		

Crossrefs

Programs

  • Magma
    [(4*n^3+18*n^2+28*n-(1-(-1)^n)) div 16: n in [0..50]]; // Vincenzo Librandi, Mar 21 2015
  • Mathematica
    CoefficientList[Series[x (x^3 - 2 x^2 + x + 3) / ((x - 1)^4(x + 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 21 2015 *)
    LinearRecurrence[{3,-2,-2,3,-1},{0,3,10,22,41},50] (* Harvey P. Dale, Jan 17 2023 *)
  • PARI
    concat(0, Vec(x*(x^3-2*x^2+x+3)/((x-1)^4*(x+1)) + O(x^100))) \\ Colin Barker, Mar 03 2015
    

Formula

G.f.: x*(x^3-2*x^2+x+3) / ((x-1)^4*(x+1)). - Colin Barker, Mar 03 2015
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5). - Colin Barker, Mar 03 2015

Extensions

Typo in formula fixed by Vincenzo Librandi, Mar 21 2015
Name rewritten using the closed form by Bruno Berselli, Apr 19 2015

A256666 a(n) = ( 2*n*(2*n^2 + 11*n + 26) - (-1)^n + 1 )/16.

Original entry on oeis.org

0, 5, 14, 29, 51, 82, 123, 176, 242, 323, 420, 535, 669, 824, 1001, 1202, 1428, 1681, 1962, 2273, 2615, 2990, 3399, 3844, 4326, 4847, 5408, 6011, 6657, 7348, 8085, 8870, 9704, 10589, 11526, 12517, 13563, 14666, 15827, 17048, 18330, 19675, 21084, 22559
Offset: 0

Views

Author

Luce ETIENNE, Apr 07 2015

Keywords

Comments

Consider a grid of small triangles of side 1 forming polygon with side n*(n+3): a(n) is the number of equilateral triangles of side length >=1 in this figure that are oriented with the sides of figure.
This sequence gives the number of triangles of all sizes in a ((n^2+3*n))-iamond with a 3*(2*n-1)-gon n>=1.
Equals (1/2)*Sum_{i=0..n-1} (n-i)*(n+1-i) + (-3 + (1/8)*Sum_{j=0..(2*n+3+(-1)^n)/4} (2*n+5-(-1)^n-4*j)*(2 n+5+(-1)^n-4*j) ) numbers of triangles in a direction and in the opposite direction.
It is also a way (3 stages) to surround triangular n^2-iamonds by 3*n triangles side 1: in first stage we obtain A045947, in second stage A248851, in third stage this sequence.

Examples

			From third comment: a(0)=0, a(1)=1+4, a(2)=4+10, a(3)=10+19, a(4)=20+31, a(5)=35+47, a(6)=56+67.
		

Crossrefs

Programs

  • Magma
    [(4*n^3+22*n^2+52*n+1-(-1)^n)/16: n in [0..50]]; // Vincenzo Librandi, Apr 08 2015
  • Mathematica
    Table[(4 n^3 + 22 n^2 + 52 n + 1 - (-1)^n)/16, {n, 0, 50}] (* Vincenzo Librandi, Apr 08 2015 *)
    LinearRecurrence[{3,-2,-2,3,-1},{0,5,14,29,51},50] (* Harvey P. Dale, Aug 18 2020 *)
  • PARI
    concat(0, Vec(x*(2*x^3-3*x^2-x+5)/((x-1)^4*(x+1)) + O(x^100))) \\ Colin Barker, Apr 07 2015
    

Formula

a(n) = 2*A248851(n) - A045947(n) + A004526(n+1).
G.f.: x*(2*x^3-3*x^2-x+5) / ((x-1)^4*(x+1)). - Colin Barker, Apr 07 2015
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5) for n>4. - Colin Barker, Apr 07 2015

A265282 Number of triangles in a certain geometric structure: see "Illustration of initial terms" link for precise definition.

Original entry on oeis.org

0, 1, 3, 5, 10, 13, 22, 26, 41, 46, 68, 74, 105, 112, 153, 161, 214, 223, 289, 299, 380, 391, 488, 500, 615, 628, 762, 776, 931, 946, 1123, 1139, 1340, 1357, 1583, 1601, 1854, 1873, 2154, 2174, 2485, 2506, 2848, 2870, 3245, 3268, 3677, 3701, 4146, 4171, 4653
Offset: 0

Views

Author

Luce ETIENNE, Dec 06 2015

Keywords

Comments

In words: This sequence gives the number of triangles of all sizes in a (2*n^2+8*n-1+(-1)^n)/8-polyiamond with a (7*n-2-(n-2)*(-1)^n)/4-gon: we have (2*n^3+9*n^2+31*n+21+3*(n^2-5*n-7)*(-1)^n)/96 triangles in a direction and (2*n^3+27*n^2+109*n-66+3*(n^2+9*n+18)*(-1)^n+12*(-1)^((2*n-1+(-1)^n)/4))/192 triangles in the other direction. (But the Illustration link is far more informative. - N. J. A. Sloane, Jan 23 2016)
At stage n, we count (2*n^2 + 6*n + 3 - (2*n+3)*(-1)^n)/16 triangles of size 1 in one direction and (2*n^2 + 10*n - 5 + (2*n+5)*(-1)^n)/16 triangles of size 1 in the opposite direction. The total number of triangles of size 1 in both directions is A024206(n+1).
We observe that a(4)=10 strengthens the Pythagorean relation between 4 and 10 (Tetraktys): cf. triangular numbers, A000217; and that it is from n = 4 we can see and count hexagonal and dodecagonal forms, for example, in a reticular system (incomplete with hexagonal holes) by opposition to the compact shape obtained from A002717.
We can obtain this reticular system from A248851.

Crossrefs

Programs

  • Magma
    [(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n) div 4)) / 64: n in [0..50]]; // Vincenzo Librandi, Dec 07 2015
    
  • Mathematica
    Table[(2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n +
        4*(-1)^((2*n - 1 + (-1)^n)/4))/64, {n, 0, 100}] (* G. C. Greubel, Dec 20 2015 *)
    LinearRecurrence[{1,2,-2,0,0,-2,2,1,-1},{0,1,3,5,10,13,22,26,41},60] (* Harvey P. Dale, Aug 07 2019 *)
  • PARI
    vector(100, n, n--; (2*n^3+15*n^2+57*n-8+(3*n^2-n+4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64) \\ Altug Alkan, Dec 06 2015
    
  • PARI
    concat(0, Vec(x*(1+2*x+x^3-x^4-x^5+x^7)/((1-x)^4*(1+x)^3*(1+x^2)) + O(x^100))) \\ Colin Barker, Dec 07 2015

Formula

a(n) = A045947(floor(n/2)) + A024206(n+1). Note that A045947(floor(n/2)) = (2*n^3-n^2-7*n+(3*n^2-n-4)*(-1)^n+4*(-1)^((2*n-1+(-1)^n)/4))/64.
a(n) = (2*n^3 + 15*n^2 + 57*n - 8 + (3*n^2 - n + 4)*(-1)^n + 4*(-1)^((2*n - 1 + (-1)^n)/4))/64.
G.f.: x*(1+2*x+x^3-x^4-x^5+x^7) / ((1-x)^4*(1+x)^3*(1+x^2)). - Colin Barker, Dec 07 2015

Extensions

a(26) corrected by Altug Alkan, Dec 06 2015
Showing 1-9 of 9 results.