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

A069813 Maximum number of triangles in polyiamond with perimeter n.

Original entry on oeis.org

1, 2, 3, 6, 7, 10, 13, 16, 19, 24, 27, 32, 37, 42, 47, 54, 59, 66, 73, 80, 87, 96, 103, 112, 121, 130, 139, 150, 159, 170, 181, 192, 203, 216, 227, 240, 253, 266, 279, 294, 307, 322, 337, 352, 367, 384, 399, 416, 433, 450, 467, 486, 503, 522, 541, 560, 579
Offset: 3

Views

Author

Winston C. Yang (winston(AT)cs.wisc.edu), Apr 30 2002

Keywords

Examples

			a(10) = 16 because the maximum number of triangles in a polyiamond of perimeter 10 is 16.
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 65); Coefficients(R!( x^3*(x^2-x-1)*(x^2+1)/((x-1)^3*(x+1)*(x^2+x+1)))); // Marius A. Burtea, Jan 03 2020
  • Maple
    A069813 := proc(n)
        round(n^2/6) ;
        if modp(n,6) <> 0 then
            %-1 ;
        else
            % ;
        end if;
    end proc: # R. J. Mathar, Jul 14 2015
  • Mathematica
    LinearRecurrence[{1, 1, 0, -1, -1, 1}, {1, 2, 3, 6, 7, 10}, 60] (* Jean-François Alcover, Jan 03 2020 *)
  • PARI
    a(n) = round(n^2/6) - (n % 6 != 0) \\ Michel Marcus, Jul 17 2013
    
  • PARI
    Vec(x^3*(x^2-x-1)*(x^2+1)/((x-1)^3*(x+1)*(x^2+x+1)) + O(x^60)) \\ Colin Barker, Jan 19 2015
    

Formula

a(n) = round(n^2/6) - (0 if n = 0 mod 6, 1 else) = A056829(n)-A097325(n).
From Colin Barker, Jan 18 2015: (Start)
a(n) = round((-25 + 9*(-1)^n + 8*exp(-2/3*i*n*Pi) + 8*exp((2*i*n*Pi)/3) + 6*n^2)/36), where i=sqrt(-1).
G.f.: x^3*(1+x-x^2)*(1+x^2) / ((1-x)^3*(1+x)*(1+x+x^2)). (End)
a(n) = A001399(n-3) + A001399(n-4) + A001399(n-6) - A001399(n-7). - R. J. Mathar, Jul 14 2015

A173691 Partial sums of round(n^2/6).

Original entry on oeis.org

0, 0, 1, 3, 6, 10, 16, 24, 35, 49, 66, 86, 110, 138, 171, 209, 252, 300, 354, 414, 481, 555, 636, 724, 820, 924, 1037, 1159, 1290, 1430, 1580, 1740, 1911, 2093, 2286, 2490, 2706, 2934, 3175, 3429, 3696, 3976, 4270, 4578, 4901, 5239, 5592, 5960, 6344, 6744, 7161
Offset: 0

Views

Author

Mircea Merca, Nov 25 2010

Keywords

Comments

Partial sums of A056829.

Examples

			a(5) = round(1/6) + round(4/6) + round(9/6) + round(16/6) + round(25/6) = 0 + 1 + 2 + 3 + 4.
Note that 9/6 = 1.5 is rounded up.
		

Crossrefs

Cf. A056829.

Programs

  • Magma
    [Floor((2*n^3+3*n^2+6*n+16)/36): n in [0..60]]; // Vincenzo Librandi, Jun 22 2011
    
  • Maple
    a(n):=round((2*n^(3)+3*n^(2)+6*n)/(36))
  • Mathematica
    Accumulate[Round[Range[0, 50]^2/6]] (* or *) LinearRecurrence[{3,-3,1,0, 0,1,-3,3,-1}, {0,0,1,3,6,10,16,24,35}, 60] (* Harvey P. Dale, Jan 08 2014 *)
    CoefficientList[Series[x^2(1+x^4)/((1+x)(1-x+x^2)(1+x+x^2)(1-x)^4), {x, 0, 60}], x] (* Vincenzo Librandi, Mar 26 2014 *)
  • PARI
    vector(60, n, n--; (16+6*n+3*n^2+2*n^3)\36) \\ G. C. Greubel, Jul 02 2019
    
  • Sage
    [floor((16+6*n+3*n^2+2*n^3)/36) for n in (0..60)] # G. C. Greubel, Jul 02 2019

Formula

a(n) = Sum_{k=0..n} round(k^2/6).
a(n) = round((2*n^3 + 3*n^2 + 6*n)/36).
a(n) = round((4*n^3 + 6*n^2 + 12*n + 5)/72).
a(n) = floor((2*n^3 + 3*n^2 + 6*n + 16)/36).
a(n) = ceiling((2*n^3 + 3*n^2 + 6*n - 11)/36).
a(n) = a(n-6) + n^2 - 5*n + 10, n > 5.
G.f.: x^2*(1+x^4)/((1+x)*(1-x+x^2)*(1+x+x^2)*(1-x)^4). - Bruno Berselli, Jan 12 2011
Showing 1-2 of 2 results.