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

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

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