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 11-15 of 15 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

A194069 1+floor((2/3)*n^2).

Original entry on oeis.org

1, 3, 7, 11, 17, 25, 33, 43, 55, 67, 81, 97, 113, 131, 151, 171, 193, 217, 241, 267, 295, 323, 353, 385, 417, 451, 487, 523, 561, 601, 641, 683, 727, 771, 817, 865, 913, 963, 1015, 1067, 1121, 1177, 1233, 1291, 1351, 1411
Offset: 1

Views

Author

Clark Kimberling, Aug 14 2011

Keywords

Crossrefs

Cf. A194070 (natural fractal sequence),
A194071 (natural fractal interspersion).

Programs

  • Mathematica
    c[k_]:=1+Floor[(2/3)k^2]; c=Table[c[k],{k,1,90}]

Formula

a(n)=1+floor(2*n^2/3).
a(n) = 1 +A030511(n+1). - R. J. Mathar, Aug 25 2011

A358163 a(n) is the permanent of the n X n matrix M(n) that is defined by M[i,j] = i*j - ceiling(i*j/3).

Original entry on oeis.org

1, 0, 1, 30, 1272, 113224, 18615680, 4299553536, 1507609286784, 781464165813504, 525599814806986752, 473934337123421786112, 567876971785035135320064, 837723761443461191423754240, 1549608938859438129393893376000, 3582000047767392376356107059200000, 9838495669776145718724862743674880000
Offset: 0

Views

Author

Stefano Spezia, Nov 01 2022

Keywords

Comments

The matrix M(n) is the n-th principal submatrix of the rectangular array A143979.
det(M(0)) = 1, det(M(2)) = -1, det(M(3)) = 2, and otherwise det(M(n)) = 0.

Examples

			a(5) = 113224:
    0  1   2   2   3
    1  2   4   5   6
    2  4   6   8  10
    2  5   8  10  13
    3  6  10  13  16
		

Crossrefs

Cf. A143979.
Cf. A030511 (matrix element M[n-1,n-1]), A358164 (hafnian of M(2*n)).

Programs

  • Mathematica
    a[n_]:=Permanent[Table[i*j-Ceiling[i*j/3],{i,n},{j,n}]]; Join[{1},Array[a,16]]
  • Python
    from fractions import Fraction
    from sympy import Matrix
    def A358163(n): return Matrix(n,n,[i*j-Fraction(i*j,3)._ceil_() for i in range(1,n+1) for j in range(1,n+1)]).per() if n else 1 # Chai Wah Wu, Nov 02 2022

A071408 a(n+1) - 2*a(n) + a(n-1) = (2/3)*(1 + w^(n+1) + w^(2*n+2)) with a(1)=0, a(2)=1, and where w is the imaginary cubic root of unity.

Original entry on oeis.org

0, 1, 4, 7, 10, 15, 20, 25, 32, 39, 46, 55, 64, 73, 84, 95, 106, 119, 132, 145, 160, 175, 190, 207, 224, 241, 260, 279, 298, 319, 340, 361, 384, 407, 430, 455, 480, 505, 532, 559, 586, 615, 644, 673, 704, 735, 766, 799, 832, 865, 900, 935, 970, 1007, 1044
Offset: 1

Views

Author

Robert G. Wilson v, Jun 24 2002

Keywords

Comments

w = exp(2*Pi*i/3)= (-1 - sqrt(-3))/2. Beginning with a(2) the first differences are 3,3,3,5,5,5,7,7,7,9,9,9,11, etc.

Crossrefs

Cf. A071618.

Programs

  • Mathematica
    a[1] = 0; a[2] = 1; w = Exp[2Pi*I/3]; a[n_] := a[n] = Simplify[(2/3)(1 + w^n + w^(2n)) + 2a[n - 1] - a[n - 2]]; Table[ a[n], {n, 1, 60}]
    Table[If[n<3,n-1,Floor[((n+1)^2-4)/3]],{n,1,100}] (*  Vladimir Joseph Stephan Orlovsky, Jan 30 2012 *)
    LinearRecurrence[{2,-1,1,-2,1},{0,1,4,7,10},60] (* Harvey P. Dale, Jun 10 2016 *)
  • PARI
    a(n)=n*(n+2)\3 - 1 \\ Charles R Greathouse IV, Mar 02 2017

Formula

a(n) = A032765(n)-1.
a(n) = floor((n-1)*(n+1)*(n+3)/(3*n+3)). - Gary Detlefs, Jul 13 2010
a(n) = (n-1)^2 - A030511(n-1). - Wesley Ivan Hurt, Jun 19 2013
G.f.: x^2*(1+x)*(x^2-x-1) / ( (1+x+x^2)*(x-1)^3 ). - R. J. Mathar, Jun 23 2013
a(n) = n + floor(n*(n-1)/3) - 1. - Bruno Berselli, Mar 02 2017

A358164 a(n) is the hafnian of the 2n X 2n symmetric matrix defined by M[i,j] = i*j - ceiling(i*j/3).

Original entry on oeis.org

1, 1, 26, 2704, 698568, 384890688, 378771904512, 597991783196160, 1450380828625459200, 5077825865646165964800, 24487520383436615392204800
Offset: 0

Views

Author

Stefano Spezia, Nov 01 2022

Keywords

Comments

The matrix M(n) is the n-th principal submatrix of the rectangular array A143979.

Examples

			a(2) = 26:
    0  1   2   2
    1  2   4   5
    2  4   6   8
    2  5   8  10
		

Crossrefs

Cf. A143979.
Cf. A030511 (matrix element M[n-1,n-1]), A358163 (permanent of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_]:=Part[Part[Table[r*c-Ceiling[r*c/3], {r, n}, {c, n}], i], j]; a[n_]:=Sum[Product[M[Part[PermutationList[s, 2n], 2i-1], Part[PermutationList[s, 2n], 2i], 2n], {i, n}], {s, SymmetricGroup[2n]//GroupElements}]/(n!*2^n); Array[a, 6, 0]
  • PARI
    tm(n) = matrix(n, n, i, j, i*j - ceil((i*j)/3));
    a(n) = my(m = tm(2*n), s=0); forperm([1..2*n], p, s += prod(j=1, n, m[p[2*j-1], p[2*j]]); ); s/(n!*2^n); \\ Michel Marcus, May 02 2023

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 15 2023
Previous Showing 11-15 of 15 results.