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.

A055327 Triangle of rooted identity trees with n nodes and k leaves.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 6, 5, 1, 9, 13, 2, 1, 12, 28, 11, 1, 16, 53, 40, 3, 1, 20, 91, 109, 26, 1, 25, 146, 254, 116, 6, 1, 30, 223, 524, 387, 61, 1, 36, 326, 998, 1068, 329, 12, 1, 42, 461, 1774, 2587, 1289, 145, 1, 49, 634, 2995, 5678, 4133, 911, 25, 1, 56
Offset: 1

Views

Author

Christian G. Bower, May 12 2000

Keywords

Comments

Row lengths are 1,1,1,2,2,3,3,4,4,5,5,6,6,...

Examples

			Triangle begins:
1;
1;
1;
1,  1;
1,  2;
1,  4,  1;
1,  6,  5;
1,  9, 13,  2;
1, 12, 28, 11;
1, 16, 53, 40, 3;
...
From _Joerg Arndt_, Aug 18 2014: (Start)
The identity trees with n=6 nodes, as (preorder-) level sequences, together with their number of leaves, and an ASCII rendering, are:
:
:     1:  [ 0 1 2 3 4 5 ]   1
:  O--o--o--o--o--o
:
:     2:  [ 0 1 2 3 4 3 ]   2
:  O--o--o--o--o
:        .--o
:
:     3:  [ 0 1 2 3 4 2 ]   2
:  O--o--o--o--o
:     .--o
:
:     4:  [ 0 1 2 3 4 1 ]   2
:  O--o--o--o--o
:  .--o
:
:     5:  [ 0 1 2 3 2 1 ]   3
:  O--o--o--o
:     .--o
:  .--o
:
:     6:  [ 0 1 2 3 1 2 ]   2
:  O--o--o--o
:  .--o--o
:
This gives [1, 4, 1], row n=6 of the triangle.
(End)
		

Crossrefs

Row sums give A004111.
Columns 2 to 8: A002620(n-2), A055328, A055329, A055330, A055331, A055332, A055333.
A regular version is A301342.
Cf. A055334.

Programs

  • PARI
    WeighMT(u)={my(n=#u, p=x*Ser(u), vars=variables(p)); Vec(exp( sum(i=1, n, (-1)^(i-1)*substvec(p + O(x*x^(n\i)), vars, apply(v->v^i,vars))/i ))-1)}
    A(n)={my(v=[y]); for(n=2, n, v=concat([y], WeighMT(v))); apply(p->Vecrev(p/y), v)}
    { my(T=A(15)); for(n=1, #T, print(T[n])) } \\ Andrew Howroyd, Aug 28 2018

Formula

G.f. satisfies A(x,y) = x*y + x*WEIGH(A(x,y)) - x. Shifts up under WEIGH transform.

A108579 Number of symmetry classes of 3 X 3 magic squares (with distinct positive entries) having magic sum 3n.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 4, 7, 10, 13, 17, 22, 26, 32, 38, 44, 51, 59, 66, 75, 84, 93, 103, 114, 124, 136, 148, 160, 173, 187, 200, 215, 230, 245, 261, 278, 294, 312, 330, 348, 367, 387, 406, 427, 448, 469, 491, 514, 536, 560, 584, 608, 633, 659, 684, 711, 738, 765, 793, 822, 850
Offset: 1

Views

Author

Thomas Zaslavsky, Jun 11 2005

Keywords

Comments

A magic square has distinct positive integers in its cells, whose sum is the same (the "magic sum") along any row, column, or main diagonal.
a(n) is given by a quasipolynomial of period 6.
It appears that A108579(n) is the number of ordered triples (w,x,y) with components all in {1,...,n} and w+n=2x+3y, as in the Mathematica section. For related sequences, see A211422. - Clark Kimberling, Apr 15 2012

Examples

			a(5) = 1 because there is a unique 3 X 3 magic square, up to symmetry, using the first 9 positive integers.
		

Crossrefs

Nonzero entries are the second differences of A055328.

Programs

  • Mathematica
    (* This program generates a sequence described in the Comments section *)
    t[n_] := t[n] = Flatten[Table[-w^2 + x*y + n, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 1, 80}]  (* A211506 *)
    (* Clark Kimberling, Apr 15 2012 *)

Formula

a(n) = floor((1/4)*(n-2)^2)-floor((1/3)*(n-1)). - Mircea Merca, Oct 08 2013
G.f.: x^5*(1+2*x)/((1-x)*(1-x^2)*(1-x^3)).

Extensions

Edited by N. J. A. Sloane, Oct 04 2010

A108578 Number of 3 X 3 magic squares with magic sum 3n.

Original entry on oeis.org

0, 0, 0, 0, 8, 24, 32, 56, 80, 104, 136, 176, 208, 256, 304, 352, 408, 472, 528, 600, 672, 744, 824, 912, 992, 1088, 1184, 1280, 1384, 1496, 1600, 1720, 1840, 1960, 2088, 2224, 2352, 2496, 2640, 2784, 2936, 3096, 3248, 3416, 3584, 3752, 3928, 4112, 4288
Offset: 1

Views

Author

Thomas Zaslavsky and Ralf Stephan, Jun 11 2005

Keywords

Comments

Contribution from Thomas Zaslavsky, Mar 12 2010: (Start)
A magic square has distinct positive integers in its cells, whose sum is the same (the "magic sum") along any row, column, or main diagonal.
a(n) is given by a quasipolynomial of period 6. (End)

Examples

			a(5) = 8 because there are 8 3 X 3 magic squares with entries 1,...,9 and magic sum 15.
		

Crossrefs

Equals 8 times the second differences of A055328.

Programs

  • Magma
    I:=[0,0,0,0,8,24]; [n le 6 select I[n] else Self(n-1)+Self(n-2)-Self(n-4)-Self(n-5)+Self(n-6): n in [1..60]]; // Vincenzo Librandi, Sep 01 2018
  • Mathematica
    LinearRecurrence[{1, 1, 0, -1, -1, 1}, {0, 0, 0, 0, 8, 24}, 50] (* Jean-François Alcover, Sep 01 2018 *)
    CoefficientList[Series[8 x^4 (1 + 2 x) / ((1 - x) (1 - x^2) (1 - x^3)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 01 2018 *)
  • PARI
    a(n)=(1/9)*(2*n^2-32*n+[144,78,120,126,96,102][(n%18)/3+1])
    
  • PARI
    x='x+O('x^99); concat(vector(4), Vec(8*x^5*(1+2*x)/((1-x)*(1-x^2)*(1-x^3)))) \\ Altug Alkan, Sep 01 2018
    

Formula

G.f.: [8*x^5*(1+2*x)] / [(1-x)*(1-x^2)*(1-x^3)].
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6). - Vincenzo Librandi, Sep 01 2018

Extensions

Edited by N. J. A. Sloane, Feb 05 2010
Corrected g.f. to account for previous change in parameter n from magic sum s to s/3; by Thomas Zaslavsky, Mar 12 2010
Showing 1-3 of 3 results.