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

A045944 Rhombic matchstick numbers: a(n) = n*(3*n+2).

Original entry on oeis.org

0, 5, 16, 33, 56, 85, 120, 161, 208, 261, 320, 385, 456, 533, 616, 705, 800, 901, 1008, 1121, 1240, 1365, 1496, 1633, 1776, 1925, 2080, 2241, 2408, 2581, 2760, 2945, 3136, 3333, 3536, 3745, 3960, 4181, 4408, 4641, 4880, 5125, 5376, 5633, 5896, 6165, 6440
Offset: 0

Views

Author

Keywords

Comments

From Floor van Lamoen, Jul 21 2001: (Start)
Write 1,2,3,4,... in a hexagonal spiral around 0, then a(n) is the n-th term of the sequence found by reading the line from 0 in the direction 0,5,.... The spiral begins:
.
85--84--83--82--81--80
. \
56--55--54--53--52 79
/ . \ \
57 33--32--31--30 51 78
/ / . \ \ \
58 34 16--15--14 29 50 77
/ / / . \ \ \ \
59 35 17 5---4 13 28 49 76
/ / / / . \ \ \ \ \
60 36 18 6 0 3 12 27 48 75
/ / / / / / / / / /
61 37 19 7 1---2 11 26 47 74
\ \ \ \ / / / /
62 38 20 8---9--10 25 46 73
\ \ \ / / /
63 39 21--22--23--24 45 72
\ \ / /
64 40--41--42--43--44 71
\ /
65--66--67--68--69--70
(End)
Connection to triangular numbers: a(n) = 4*T_n + S_n where T_n is the n-th triangular number and S_n is the n-th square. - William A. Tedeschi, Sep 12 2010
Also, second octagonal numbers. - Bruno Berselli, Jan 13 2011
Sequence found by reading the line from 0, in the direction 0, 16, ... and the line from 5, in the direction 5, 33, ..., in the square spiral whose vertices are the generalized octagonal numbers A001082. - Omar E. Pol, Jul 18 2012
Let P denote the points from the n X n grid. A(n-1) also coincides with the minimum number of points Q needed to "block" P, that is, every line segment spanned by two points from P must contain one point from Q. - Manfred Scheucher, Aug 30 2018
Also the number of internal edges of an (n+1)*(n+1) "square" of hexagons; i.e., n+1 rows, each of n+1 edge-adjacent hexagons, stacked with minimal overhang. - Jon Hart, Sep 29 2019
For n >= 1, the continued fraction expansion of sqrt(27*a(n)) is [9n+2; {1, 2n-1, 1, 1, 1, 2n-1, 1, 18n+4}]. - Magus K. Chu, Oct 13 2022

Crossrefs

Bisection of A001859. See Comments of A135713.
Cf. second n-gonal numbers: A005449, A014105, A147875, A179986, A033954, A062728, A135705.
Cf. A056109.
Cf. A003154.

Programs

Formula

O.g.f.: x*(5+x)/(1-x)^3. - R. J. Mathar, Jan 07 2008
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), with a(0)=0, a(1)=5, a(2)=16. - Harvey P. Dale, May 06 2011
a(n) = a(n-1) + 6*n - 1 (with a(0)=0). - Vincenzo Librandi, Nov 18 2010
For n > 0, a(n)^3 + (a(n)+1)^3 + ... + (a(n)+n)^3 + 2*A000217(n)^2 = (a(n) + n + 1)^3 + ... + (a(n) + 2n)^3; see also A033954. - Charlie Marion, Dec 08 2007
a(n) = Sum_{i=0..n-1} A016969(i) for n > 0. - Bruno Berselli, Jan 13 2011
a(n) = A174709(6*n+4). - Philippe Deléham, Mar 26 2013
a(n) = A001082(2*n). - Michael Turniansky, Aug 24 2013
Sum_{n>=1} 1/a(n) = (9 + sqrt(3)*Pi - 9*log(3))/12 = 0.3794906245574721941... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A002378(n) + A014105(n). - J. M. Bergot, Apr 24 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/sqrt(12) - 3/4. - Amiram Eldar, Jul 03 2020
E.g.f.: exp(x)*x*(5 + 3*x). - Stefano Spezia, Jun 08 2021
From Leo Tavares, Oct 14 2021: (Start)
a(n) = A000290(n) + 4*A000217(n). See Square Stars illustration.
a(n) = A000567(n+2) - A022144(n+1)
a(n) = A005563(n) + A001105(n).
a(n) = A056109(n) - 1. (End)
From Leo Tavares, Oct 06 2022: (Start)
a(n) = A003154(n+1) - A000567(n+1). See Split Stars illustration.
a(n) = A014105(n) + 2*A000217(n). (End)

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

A270710 a(n) = 3*n^2 + 2*n - 1.

Original entry on oeis.org

-1, 4, 15, 32, 55, 84, 119, 160, 207, 260, 319, 384, 455, 532, 615, 704, 799, 900, 1007, 1120, 1239, 1364, 1495, 1632, 1775, 1924, 2079, 2240, 2407, 2580, 2759, 2944, 3135, 3332, 3535, 3744, 3959, 4180, 4407, 4640, 4879, 5124, 5375, 5632, 5895, 6164, 6439, 6720, 7007, 7300, 7599
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 22 2016

Keywords

Comments

In general, the ordinary generating function for the values of quadratic polynomial p*n^2 + q*n + k, is (k + (p + q - 2*k)*x + (p - q + k)*x^2)/(1 - x)^3.
From Bruno Berselli, Mar 25 2016: (Start)
This sequence and A140676 provide all integer m such that 3*m + 4 is a square.
Numbers related to A135713 by A135713(n) = n*a(n) - Sum_{k=0..n-1} a(k).
After -1, second bisection of A184005. (End)

Examples

			a(0) = 3*0^2 + 2*0 - 1 = -1;
a(1) = 3*1^2 + 2*1 - 1 =  4;
a(2) = 3*2^2 + 2*2 - 1 = 15;
a(3) = 3*3^2 + 2*3 - 1 = 32, etc.
		

Crossrefs

Programs

  • GAP
    List([0..50], n -> 3*n^2+2*n-1); # Bruno Berselli, Feb 16 2018
  • Magma
    [3*n^2+2*n-1: n in [0..50]]; // Bruno Berselli, Mar 25 2016
    
  • Mathematica
    Table[3 n^2 + 2 n - 1, {n, 0, 50}]
    LinearRecurrence[{3, -3, 1}, {-1, 4, 15}, 51]
  • Maxima
    makelist(3*n^2+2*n-1, n, 0, 50); /* Bruno Berselli, Mar 25 2016 */
    
  • PARI
    Vec((-1 + 7*x)/(1 - x)^3 + O(x^60)) \\ Michel Marcus, Mar 22 2016
    
  • PARI
    lista(nn) = {for(n=0, nn, print1(3*n^2 + 2*n - 1, ", ")); } \\ Altug Alkan, Mar 25 2016
    
  • PARI
    vector(50, n, n--; 3*n^2+2*n-1) \\ Bruno Berselli, Mar 25 2016
    
  • Sage
    [3*n^2+2*n-1 for n in (0..50)] # Bruno Berselli, Mar 25 2016
    

Formula

G.f.: (-1 + 7*x)/(1 - x)^3.
E.g.f.: exp(x)*(-1 + 5*x + 3*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = A033428(n) + A060747(n).
a(n) = A045944(n) - 1 = A056109(n) - 2.
a(-n) = A140676(n-1), with A140676(-1) = -1.
Sum_{n>=0} 1/a(n) = 3*(log(3) - 2)/8 - Pi/(8*sqrt(3)) = -0.564745312278736...
a(n) = Sum_{i = n-1..2*n-1} (2*i + 1). - Bruno Berselli, Feb 16 2018
a(n) = A000290(n+1) + 2*A000290(n) - 2. - Leo Tavares, May 28 2023
Sum_{n>=0} (-1)^(n+1)/a(n) = Pi/(4*sqrt(3)) + 3/4. - Amiram Eldar, Jul 20 2023

A290168 If n is even then a(n) = n^2*(n+2)/8, otherwise a(n) = (n-1)*n*(n+1)/8.

Original entry on oeis.org

0, 0, 2, 3, 12, 15, 36, 42, 80, 90, 150, 165, 252, 273, 392, 420, 576, 612, 810, 855, 1100, 1155, 1452, 1518, 1872, 1950, 2366, 2457, 2940, 3045, 3600, 3720, 4352, 4488, 5202, 5355, 6156, 6327, 7220, 7410, 8400
Offset: 0

Views

Author

Keywords

Comments

Bisection of a(n) [0, 2, 12, 36, 80, 150, 252, ...] is A011379.
Bisection [0, 3, 15, 42, 90, 165, 273, ...] is A059270.
Considering s(n) = [0, 0, 0, 0, 1, 1, 3, 3, 6, 6, 10, 10, 15, 15, ...] (triangular numbers repeated - see A008805), a(n) = n*s(n+2) holds.
Considering the first differences of a(n), b(n) = [0, 2, 1 , 9, 3, 21, 6, 38, 10, 60, 15, 87, ...], b(n) shows bisections A000217 and A005476. In addition, b(n) begins like A249264 up to 12th term, and is an alternation of 4 multiples of 3 and 2 not multiples; b(n) is also such that b(2n) + b(2n+1) = A049450(n).
Considering the second differences c(n), c(n) shows bisections A001105(n+1) and -A000384(n+1), c(n) has 3 consecutive terms multiples of 3 alternating with 3 not multiples; in addition, c(2n) + c(2n+1) = A000027(n).
Considering a(n)/c(n) = [0, 0, 1/4, -1/2, 2/3, -1, 9/8, -3/2, 8/5, -2, 25/12, -5/2, ...], it appears that it is A129194(n)/A022998(n+1) and -A026741(n)/A000034(n) alternating.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[EvenQ[n], n^2*(n + 2)/8, (n - 1)*n*(n + 1)/8]; Table[a[n], {n, 0, 40}]
  • PARI
    a(n) = if(n%2==0, n^2*(n+2)/8, (n-1)*n*(n+1)/8) \\ Felix Fröhlich, Jul 23 2017

Formula

G.f.: x^2*(2 + x + 3*x^2)/((x-1)^4*(x+1)^3).
a(n) = (1/16)*(-1)^n*n*(1 + (-1)^(n+1) + 2*(1 + (-1)^n)*n + 2*(-1)^n*n^2).
Sum_{n>=2} 1/a(n) = 5 + Pi^2/6 - 8*log(2). - Amiram Eldar, Sep 17 2022
Showing 1-4 of 4 results.