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 31-40 of 64 results. Next

A210440 a(n) = 2*n*(n+1)*(n+2)/3.

Original entry on oeis.org

0, 4, 16, 40, 80, 140, 224, 336, 480, 660, 880, 1144, 1456, 1820, 2240, 2720, 3264, 3876, 4560, 5320, 6160, 7084, 8096, 9200, 10400, 11700, 13104, 14616, 16240, 17980, 19840, 21824, 23936, 26180, 28560, 31080, 33744, 36556, 39520, 42640, 45920, 49364, 52976
Offset: 0

Views

Author

Michel Marcus, Jan 20 2013

Keywords

Comments

Number of tin boxes necessary to build a tetrahedron with side length n, as shown in the link.
If "0" is prepended, a(n) is the convolution of 2n with itself. - Wesley Ivan Hurt, Mar 14 2015

Crossrefs

Cf. A000292, A028552, A033488 (partial sums), A046092, A130809.

Programs

Formula

a(n) = 4*A000292(n).
a(n+1)-a(n) = A046092(n+1).
From Bruno Berselli, Jan 20 2013: (Start)
G.f.: 4*x/(1-x)^4.
a(n) = -a(-n-2) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4).
a(n)-a(-n) = A217873(n).
a(n)+a(-n) = A016742(n).
(n-1)*a(n)-n*a(n-1) = A130809(n+1) with n>1. (End)
From Bruno Berselli, Jan 21 2013: (Start)
a(n) = n*A028552(n) - Sum_{i=0..n-1} A028552(i) for n>0.
4*A001296(n) = n*a(n) - Sum_{i=0..n-1} a(i) for n>0. (End)
G.f.: 2*x*W(0), where W(k) = 1 + 1/(1 - x*(k+2)*(k+4)/(x*(k+2)*(k+4) + (k+1)*(k+2)/W(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 24 2013
a(n) = Sum_{i=1..n} i*(2*n-i+3). - Wesley Ivan Hurt, Oct 03 2013
From Amiram Eldar, Apr 30 2023: (Start)
Sum_{n>=1} 1/a(n) = 3/8.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*log(2) - 15/8. (End)
E.g.f.: 2*exp(x)*x*(6 + 6*x + x^2)/3. - Stefano Spezia, Jul 11 2025

A217748 Number of regions with infinite area in the exterior of a regular n-gon with all diagonals drawn.

Original entry on oeis.org

1, 4, 10, 18, 28, 40, 54, 70, 88, 108, 130, 154, 180, 208, 238, 270, 304, 340, 378, 418, 460, 504, 550, 598, 648, 700, 754, 810, 868, 928, 990, 1054, 1120, 1188, 1258, 1330, 1404, 1480, 1558, 1638, 1720, 1804, 1890, 1978, 2068, 2160, 2254, 2350, 2448, 2548
Offset: 3

Views

Author

Martin Renner, Mar 23 2013

Keywords

Comments

For n > 3 same as A028552(n-3).

Examples

			a(3) = 1 since the equilateral triangle has no diagonals and therefore one exterior region with infinite area.
a(4) = 4 since the two diagonals of the square divide the exterior in four regions with infinite area.
a(5) = 10 since the ten diagonals of the regular pentagon divide the exterior in ten regions with infinite area of two different shapes.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := n*(n - 3); a[3] = 1; Array[a, 50, 3] (* Amiram Eldar, Dec 10 2022 *)
  • PARI
    a(n) = if(n == 3, 1, n*(n-3)); \\ Amiram Eldar, Dec 10 2022

Formula

a(n) = n*(n-3) for n > 3.
a(n) = A217745(n) - A217746(n).
From Amiram Eldar, Dec 10 2022: (Start)
Sum_{n>=3} 1/a(n) = 29/18.
Sum_{n>=3} (-1)^(n+1)/a(n) = 23/18 - 2*log(2)/3. (End)

A220508 T(n,k) = n^2 + k if k <= n, otherwise T(n,k) = k*(k + 2) - n; square array T(n,k) read by ascending antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

0, 1, 3, 4, 2, 8, 9, 5, 7, 15, 16, 10, 6, 14, 24, 25, 17, 11, 13, 23, 35, 36, 26, 18, 12, 22, 34, 48, 49, 37, 27, 19, 21, 33, 47, 63, 64, 50, 38, 28, 20, 32, 46, 62, 80, 81, 65, 51, 39, 29, 31, 45, 61, 79, 99, 100, 82, 66, 52, 40, 30, 44, 60, 78, 98, 120
Offset: 0

Views

Author

Omar E. Pol, Feb 09 2013

Keywords

Comments

This sequence consists of 0 together with a permutation of the natural numbers. The nonnegative integers (A001477) are arranged in the successive layers from T(0,0) = 0. The n-th layer start with T(n,1) = n^2. The n-th layer is formed by the first n+1 elements of row n and the first n elements in increasing order of the column n.
The first antidiagonal is formed by odd numbers: 1, 3. The second antidiagonal is formed by even numbers: 4, 2, 8. The third antidiagonal is formed by odd numbers: 9, 5, 7, 15. And so on.
It appears that in the n-th layer there is at least a prime number <= g and also there is at least a prime number > g, where g is the number on the main diagonal, the n-th oblong number A002378(n), if n >= 1.

Examples

			The second layer is [4, 5, 6, 7, 8] which looks like this:
  .  .  8
  .  .  7,
  4, 5, 6,
Square array T(0,0)..T(10,10) begins:
    0,   3,   8,  15,  24,  35,  48,  63,  80,  99, 120,...
    1,   2,   7,  14,  23,  34,  47,  62,  79,  98, 119,...
    4,   5,   6,  13,  22,  33,  46,  61,  78,  97, 118,...
    9,  10,  11,  12,  21,  32,  45,  60,  77,  96, 117,...
   16,  17,  18,  19,  20,  31,  44,  59,  76,  95, 118,...
   25,  26,  27,  28,  29,  30,  43,  58,  75,  94, 117,...
   36,  37,  38,  39,  40,  41,  42,  57,  74,  93, 114,...
   49,  50,  51,  52,  53,  54,  55,  56,  73,  92, 113,...
   64,  65,  66,  67,  68,  69,  70,  71,  72,  91, 112,...
   81,  82,  83,  84,  85,  86,  87,  88,  89,  90, 111,...
  100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,...
  ...
		

Crossrefs

Column 1 is A000290. Main diagonal is A002378. Column 2 is essentially A002522. Row 1 is A005563. Row 2 gives the absolute terms of A008865.

Formula

From Petros Hadjicostas, Mar 10 2021: (Start)
T(n,k) = (A342354(n,k) - 1)/2.
O.g.f.: (x^4*y^3 + 3*x^3*y^4 + x^4*y^2 - 10*x^3*y^3 - x^2*y^4 + 3*x^3*y^2 + x^2*y^3 - 4*x^3*y + 8*x^2*y^2 + 3*x^2*y + x*y^2 + x^2 - 10*x*y - y^2 + x + 3*y)/((1 - x)^3*(1 - y)^3*(1 - x*y)^2). (End)

Extensions

Name edited by Petros Hadjicostas, Mar 10 2021

A132772 a(n) = n*(n + 30).

Original entry on oeis.org

0, 31, 64, 99, 136, 175, 216, 259, 304, 351, 400, 451, 504, 559, 616, 675, 736, 799, 864, 931, 1000, 1071, 1144, 1219, 1296, 1375, 1456, 1539, 1624, 1711, 1800, 1891, 1984, 2079, 2176, 2275, 2376, 2479, 2584, 2691, 2800, 2911, 3024, 3139, 3256, 3375, 3496, 3619
Offset: 0

Views

Author

Omar E. Pol, Aug 28 2007

Keywords

Crossrefs

Programs

Formula

G.f.: x*(31-29*x)/(1-x)^3. - R. J. Mathar, Nov 14 2007
a(n) = 2*n + a(n-1) + 29 (with a(0)=0). - Vincenzo Librandi, Aug 03 2010
a(0)=0, a(1)=31, a(2)=64, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Mar 06 2015
From Amiram Eldar, Jan 16 2021: (Start)
Sum_{n>=1} 1/a(n) = H(30)/30 = A001008(30)/A102928(30) = 9304682830147/69872686884000, where H(k) is the k-th harmonic number.
Sum_{n>=1} (-1)^(n+1)/a(n) = 225175759291/9981812412000. (End)
E.g.f.: x*(31 + x)*exp(x). - G. C. Greubel, Mar 13 2022

A211441 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w + x + y = 2.

Original entry on oeis.org

0, 3, 15, 33, 57, 87, 123, 165, 213, 267, 327, 393, 465, 543, 627, 717, 813, 915, 1023, 1137, 1257, 1383, 1515, 1653, 1797, 1947, 2103, 2265, 2433, 2607, 2787, 2973, 3165, 3363, 3567, 3777, 3993, 4215, 4443, 4677, 4917, 5163, 5415, 5673, 5937
Offset: 0

Views

Author

Clark Kimberling, Apr 11 2012

Keywords

Comments

For a guide to related sequences, see A211422.
From Klaus Purath, Jan 08 2019: (Start)
Number of dots in a hexagon in which the sides are alternately n-1 and n+3 dots long for n >= 3. a(n) = 3*k^2 + 9*k + 3, where k = n - 1 denotes the number of dots at the shorter side of the hexagon.
Let p be a prime number > 5. Then p divides exactly 2 terms out of any in p consecutive terms. If a(i) and a(k) contain the prime factor p, then i + k == -3 (mod p). (End)
From Klaus Purath, Aug 08 2019: (Start)
Proof of Colin Barker's formulas: The first differences of the sequence for n > 0 are equal to 6*n. We assume that the recurrence a(n) = a(n-1) + 6*n is valid for any n > 1. In it, a(n-1) denotes the number of all ordered triples with -n < w, x, y < n according to the definition of the sequence. Consequently, 6*n must denote the number of all ordered triples containing -n and/or n, which must be proved.
The statement is empirically confirmed for the first n. We show that this applies to any n. With even n we determine all triples {w,x,y} with w = -n, x + y = n + 2 and start the enumeration of the triples with the highest possible value for x and end with the triple where x = y is: {-n, n, 2}, {-n, n-1, 3}, ..., {-n, n-i, 2+i}, ..., {-n, n-(n-2)/2, 2+(n-2)/2}. These are (n-2)/2 + 1 triples.
Now we set w = n and determine all triples {w,x,y} with x + y = 2 - n. We start the enumeration with the smallest possible x and end again, when x = y: {n, -n, 2}, {n, 1-n, 1}, ..., {n, i-n, 2-i}, ..., {n, (n+2)/2-n, 2-(n+2)/2}. These are (n+2)/2 +1 triples. Altogether we get n + 2 triples. Since the first triples of the two enumerations are identical, n + 1 triples remain. To get the ordered triples, they have to be permuted. We take into account that the respectively last triples contain two identical components and that only n - 1 triples consist of three distinct components. Thus the number of ordered triples (w,x,y) totals (n-1)* 3! + 2* 3!/2! = 6*n, which had to be proven.
With odd n we proceed in the same way with the difference that we end the two enumerations when |x - y| = 1. With w = -n we start with the largest possible x: {-n, n, 2}, {-n, n-1, 3}, ..., {-n, n-i, 2+i}, ..., {-n, n-(n-3)/2, 2+(n-3)/2}. These are (n-3)/2 + 1 triples.
For w = n we start with the smallest possible x: {n, -n, 2}, {n, 1-n, 1}, ..., {n, i-n, 2-i}, ..., {n, (n+1)/2-n, 2-(n+1)/2}. These are (n+1)/2 + 1 triples. Altogether these are n + 1 triples. Because the respectively first triples are identical here, n triples remain, and by permutation this results in 6*n ordered triples. Thus the proof is complete.
(End)

Examples

			From _Klaus Purath_, Jan 08 2019: (Start)
Illustration of initial terms for n >= 3:
.
.                                          o o o o o o o o
.                     o o o o o o o       o o o o o o o o o
.    o o o o o o     o o o o o o o o     o o o o o o o o o o
.   o o o o o o o   o o o o o o o o o   o o o o o o o o o o o
.    o o o o o o     o o o o o o o o     o o o o o o o o o o
.     o o o o o       o o o o o o o       o o o o o o o o o
.      o o o o         o o o o o o         o o o o o o o o
.       o o o           o o o o o           o o o o o o o
.        o o             o o o o             o o o o o o
.                         o o o               o o o o o
.                                              o o o o
.
.   a(3) = 33          a(4) = 57             a(5) = 87
(End)
		

Crossrefs

Cf. A211422.

Programs

  • GAP
    b:=[3,15,33];; for n in [4..50] do b[n]:=3*b[n-1]-3*b[n-2]+b[n-3]; od; a:=Concatenation([0],b);; Print(a); # Muniru A Asiru, Jan 23 2019
    
  • Magma
    [n le 0 select 0 else 3*(n^2+n-1): n in [0..50]]; // G. C. Greubel, Feb 10 2019
    
  • Mathematica
    t[n_]:= t[n]= Flatten[Table[w+x+y-2, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
    c[n_]:= Count[t[n], 0]
    t = Table[c[n], {n, 0, 60}] (* A211441 *)
    t/3                         (* A028387 *)
    Join[{0},LinearRecurrence[{3,-3,1},{3,15,33},50]] (* Harvey P. Dale, May 10 2012 *)
  • PARI
    vector(50, n, n--; if(n==0, 0, 3*(n^2+n-1))) \\ G. C. Greubel, Feb 10 2019
    
  • Sage
    [0] + [3*(n^2+n-1) for n in (1..50)] # G. C. Greubel, Feb 10 2019

Formula

From Colin Barker, Apr 18 2012: (Start)
a(n) = 3*(n^2 + n - 1) for n > 0.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3.
G.f.: 3*x*(1 + 2*x - x^2)/(1 - x)^3. (End)
From Klaus Purath, Jan 08 2019: (Start)
a(n) = 3*A028387(n-1).
a(n) = 3*A028552(n-1) + 3.
a(n) = 3*A002378(n) - 3.
a(n) = 3*A003215(n) - 4.
a(n) + a(n+1) + a(n+2) + a(n+3) = 3*(2*n+4)^2 = 12*(n+2)^2 for n > 0.
a(n) + a(n+1) + a(n+2) = 3*A003215(n+1) - 6 for n > 0. (End)
E.g.f.: 3 + 3*exp(x)*(-1 + 2*x + x^2). - Stefano Spezia, Aug 08 2019

A213921 Natural numbers placed in table T(n,k) layer by layer. The order of placement: at the beginning filled odd places of layer clockwise, next - even places clockwise. Table T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 8, 9, 13, 17, 14, 6, 16, 21, 26, 22, 11, 12, 25, 31, 37, 32, 18, 15, 20, 36, 43, 50, 44, 27, 23, 24, 30, 49, 57, 65, 58, 38, 33, 19, 35, 42, 64, 73, 82, 74, 51, 45, 28, 29, 48, 56, 81, 91, 101, 92, 66, 59, 39, 34, 41, 63, 72, 100, 111
Offset: 1

Views

Author

Boris Putievskiy, Mar 05 2013

Keywords

Comments

A permutation of the natural numbers.
a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). Enumeration table T(n,k) is layer by layer. The order of the list:
T(1,1)=1;
T(1,2), T(2,1), T(2,2);
. . .
T(1,n), T(3,n), ... T(n,3), T(n,1), T(2,n), T(4,n), ... T(n,4), T(n,2);
...

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   8  14  22  32 ...
   7   9   6  11  18  27 ...
  13  16  12  15  23  33 ...
  21  25  20  24  19  28 ...
  31  36  30  35  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  8,  9, 13;
  17, 14,  6, 16, 21;
  26, 22, 11, 12, 25, 31;
  ...
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if i > j:
       result=i*i-(j%2)*i+2-int((j+2)/2)
    else:
       result=j*j-((i%2)+1)*j + int((i+3)/2)

Formula

As a table:
T(n,k) = n*n - (k mod 2)*n + 2 - floor((k+2)/2), if n>k;
T(n,k) = k*k - ((n mod 2)+1)*k + floor((n+3)/2), if n<=k.
As a linear sequence:
a(n) = i*i - (j mod 2)*i + 2 - floor((j+2)/2), if i>j;
a(n) = j*j - ((i mod 2)+1)*j + floor((i+3)/2), if i<=j; where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2).

A217571 a(n) = (2*n*(n+5) + (2*n+1)*(-1)^n - 1)/8.

Original entry on oeis.org

1, 4, 5, 10, 11, 18, 19, 28, 29, 40, 41, 54, 55, 70, 71, 88, 89, 108, 109, 130, 131, 154, 155, 180, 181, 208, 209, 238, 239, 270, 271, 304, 305, 340, 341, 378, 379, 418, 419, 460, 461, 504, 505, 550, 551, 598, 599, 648, 649, 700, 701, 754, 755, 810, 811, 868
Offset: 1

Views

Author

Takumi Sato, Oct 07 2012

Keywords

Comments

One of four sequences given by classifying natural numbers according to the value of floor(sqrt(n)). See Sato link and sequences A005563, A217570, A217575.
Numbers n such that floor(sqrt(n)) = floor(n/floor(sqrt(n))) = floor(n/(floor(sqrt(n)) + 2)) + 1.

Examples

			From _Stefano Spezia_, Dec 14 2019: (Start)
Illustration of the initial terms:
o      o        o        o           o
     o o o    o o o    o o o       o o o
                o        o           o
                     o o o o o   o o o o o
                                     o
(1)   (4)      (5)     (10)        (11)
(End)
		

Crossrefs

Programs

  • GAP
    List([1..60], n-> (2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8 ); # G. C. Greubel, Dec 19 2019
  • Magma
    [n: n in [1..900] | Floor(n/Isqrt(n)) eq Floor(n/(Isqrt(n)+2))+1]; // Bruno Berselli, Oct 10 2012
    
  • Magma
    I:=[1, 4, 5, 10, 11]; [n le 5 select I[n] else Self(n-1) + 2*Self(n-2) - 2*Self(n-3) - Self(n-4) + Self(n-5): n in [1..60]]; // Vincenzo Librandi, Dec 15 2012
    
  • Maple
    seq( (2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8, n=1..60); # G. C. Greubel, Dec 19 2019
  • Mathematica
    CoefficientList[Series[(1 + 3*x - x^2 - x^3)/((1 + x)^2*(1 - x)^3), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 15 2012 *)
    a[1]=1;a[n_]:=If[EvenQ[n],a[n-1]+1+n,a[n-1]+1]; Array[a,56] (* Stefano Spezia, Dec 18 2019 *)
  • Maxima
    makelist((2*n*(n+5)+(2*n+1)*(-1)^n-1)/8, n, 1, 56); /* Martin Ettl, Oct 15 2012 */
    
  • PARI
    vector(60, n, (2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8 ) \\ G. C. Greubel, Dec 19 2019
    
  • Sage
    [(2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8 for n in (1..60)] # G. C. Greubel, Dec 19 2019
    

Formula

G.f.: x*(1+3*x-x^2-x^3)/((1+x)^2*(1-x)^3). - Bruno Berselli, Oct 11 2012
From Stefano Spezia, Dec 14 2019: (Start)
E.g.f.: (x*(5+x)*cosh(x) - (1-7*x-x^2)*sinh(x))/4.
a(n) = a(n-1) + 1 for n odd.
a(n) = a(n-1) + n + 1 for n even.
a(2*n) = A028552(n).
a(2*n+1) = A028387(n).
(End)

Extensions

Definition by Bruno Berselli, Oct 11 2012

A061897 Square table by antidiagonals of number of routes of length 2k+n on the sides of a 2n-gon from a point to its opposite point.

Original entry on oeis.org

1, 0, 2, 0, 0, 2, 0, 0, 4, 2, 0, 0, 8, 6, 2, 0, 0, 16, 18, 8, 2, 0, 0, 32, 54, 28, 10, 2, 0, 0, 64, 162, 96, 40, 12, 2, 0, 0, 128, 486, 328, 150, 54, 14, 2, 0, 0, 256, 1458, 1120, 550, 220, 70, 16, 2, 0, 0, 512, 4374, 3824, 2000, 858, 308, 88, 18, 2, 0, 0, 1024, 13122, 13056
Offset: 0

Views

Author

Henry Bottomley, May 14 2001

Keywords

Examples

			Rows start
  1, 0, 0, 0, 0, ...
  2, 0, 0, 0, 0, ...
  2, 4, 8, 16, 32, ...
  2, 6, 18, 54, 162, ...
  2, 8, 28, 96, 328, ...
  ...
		

Crossrefs

Cf. A060995. Rows include A000007, A000038, A000079, A008776, A060995. Columns effectively (i.e. except for a small number of terms) include A040000, A005843, A028552.

Formula

T(0, 0)=1; if n>0, T(n, 0)=2; if k>1, T(n, k)=T(n, k-1)*A061896(n, 1)-T(n, k-2)*A061896(n, 2)+T(n, k-3)*A061896(n, 3)-T(n, k-4)*A061896(n, 4)+...T(n, k-[n/2])*A061896(n, [n/2]); if 0>k T(n, k)=0.

A173963 Number of nonoverlapping placements of one 1 X 1 square and one 2 X 2 square on an n X n board.

Original entry on oeis.org

0, 0, 20, 108, 336, 800, 1620, 2940, 4928, 7776, 11700, 16940, 23760, 32448, 43316, 56700, 72960, 92480, 115668, 142956, 174800, 211680, 254100, 302588, 357696, 420000, 490100, 568620, 656208, 753536, 861300, 980220, 1111040, 1254528
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 03 2010

Keywords

Comments

Also the number of placements of a horizontal and a vertical domino on the n X n board. - Ralf Stephan, Jun 10 2014

Programs

  • Magma
    [(n^2 - 4) * (n-1)^2: n in [1..40]]; // Vincenzo Librandi, Sep 14 2011
  • Mathematica
    Table[(n^2-4)(n-1)^2,{n,40}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,0,20,108,336},40] (* Harvey P. Dale, Aug 16 2011 *)

Formula

a(n) = (n^2 - 4) * (n-1)^2.
a(n) = A000290(n-1)*A028347(n) = A085740(n-1)/4;
a(n) = A002378(n-2)*A028552(n-1), for n > 1.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), with a(1)=0, a(2)=0, a(3)=20, a(4)=108, a(5)=336. - Harvey P. Dale, Aug 16 2011
G.f.: (4*x^3*((x-2)*x-5))/(x-1)^5. - Harvey P. Dale, Aug 16 2011

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
Previous Showing 31-40 of 64 results. Next