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.

A167865 Number of partitions of n into distinct parts greater than 1, with each part divisible by the next.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 4, 1, 3, 3, 3, 1, 5, 1, 5, 4, 3, 1, 6, 2, 5, 4, 5, 1, 9, 1, 6, 4, 4, 4, 8, 1, 6, 6, 7, 1, 11, 1, 8, 8, 4, 1, 10, 3, 10, 5, 8, 1, 11, 4, 10, 7, 6, 1, 13, 1, 10, 11, 7, 6, 15, 1, 9, 5, 11, 1, 14, 1, 9, 12, 8, 5, 15, 1, 16, 9, 8, 1, 18, 5, 12, 7, 10, 1, 21, 7, 13, 11, 5
Offset: 0

Views

Author

Max Alekseyev, Nov 13 2009

Keywords

Comments

Number of lone-child-avoiding achiral rooted trees with n + 1 vertices, where a rooted tree is lone-child-avoiding if all terminal subtrees have at least two branches, and achiral if all branches directly under any given vertex are equal. The Matula-Goebel numbers of these trees are given by A331967. - Gus Wiseman, Feb 07 2020

Examples

			a(12) = 4: [12], [10,2], [9,3], [8,4].
a(14) = 3: [14], [12,2], [8,4,2].
a(18) = 5: [18], [16,2], [15,3], [12,6], [12,4,2].
From _Gus Wiseman_, Jul 13 2018: (Start)
The a(36) = 8 lone-child-avoiding achiral rooted trees with 37 vertices:
  (oooooooooooooooooooooooooooooooooooo)
  ((oo)(oo)(oo)(oo)(oo)(oo)(oo)(oo)(oo)(oo)(oo)(oo))
  ((ooo)(ooo)(ooo)(ooo)(ooo)(ooo)(ooo)(ooo)(ooo))
  ((ooooo)(ooooo)(ooooo)(ooooo)(ooooo)(ooooo))
  ((oooooooo)(oooooooo)(oooooooo)(oooooooo))
  (((ooo)(ooo))((ooo)(ooo))((ooo)(ooo))((ooo)(ooo)))
  ((ooooooooooo)(ooooooooooo)(ooooooooooo))
  ((ooooooooooooooooo)(ooooooooooooooooo))
(End)
		

Crossrefs

The semi-achiral version is A320268.
Matula-Goebel numbers of these trees are A331967.
The semi-lone-child-avoiding version is A331991.
Achiral rooted trees are counted by A003238.

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember;
          `if`(n=0, 1, add(a((n-d)/d), d=divisors(n) minus{1}))
        end:
    seq(a(n), n=0..200);  # Alois P. Heinz, Mar 28 2011
  • Mathematica
    a[0] = 1; a[n_] := a[n] = DivisorSum[n, a[(n-#)/#]&, #>1&]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 07 2015 *)
  • PARI
    { A167865(n) = if(n==0,return(1)); sumdiv(n,d, if(d>1, A167865((n-d)\d) ) ) }

Formula

a(0) = 1 and for n>=1, a(n) = Sum_{d|n, d>1} a((n-d)/d).
G.f. A(x) satisfies: A(x) = 1 + x^2*A(x^2) + x^3*A(x^3) + x^4*A(x^4) + ... - Ilya Gutkovskiy, May 09 2019

A122651 Number of partitions of n into distinct parts, with each part divisible by the next.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 3, 5, 5, 4, 6, 6, 4, 6, 6, 6, 9, 7, 4, 7, 8, 7, 9, 9, 6, 10, 10, 7, 10, 8, 8, 12, 9, 7, 12, 13, 8, 12, 12, 9, 16, 12, 5, 11, 13, 13, 15, 13, 9, 12, 15, 14, 17, 13, 7, 14, 14, 11, 21, 18, 13, 21, 16, 10, 14, 16, 12, 15, 15, 10, 21, 20, 13, 20, 16, 17, 25, 17, 9, 19
Offset: 0

Views

Author

Keywords

Examples

			a(9)  = 4 : [9], [8,1], [6,3], [6,2,1].
a(15) = 6 : [15], [14,1], [12,3], [12,2,1], [10,5], [8,4,2,1].
		

Crossrefs

Programs

  • Maple
    A122651r := proc(n,pmax,dv) option remember ; local a,d ; a := 0 ; for d in dv do if d = n and d <= pmax then a := a+1 ; elif d < pmax and n-d > 0 then a := a+A122651r(n-d,d-1,numtheory[divisors](d) minus {d} ) ; fi; od: a ; end: A122651 := proc(n) local i; A122651r(n,n, convert([seq(i,i=1..n)],set) ) ; end: for n from 1 to 120 do printf("%d,",A122651(n)) ; od:  # R. J. Mathar, May 22 2009
    # second Maple program:
    with(numtheory):
    b:= proc(n) option remember;
          `if`(n=0, 1, add(b((n-d)/d), d=divisors(n) minus{1}))
        end:
    a:= n-> `if`(n=0, 1, b(n)+b(n-1));
    seq(a(n), n=0..200);  # Alois P. Heinz, Mar 28 2011
  • Mathematica
    b[0] = 1; b[n_] := b[n] = Sum[b[(n - d)/d], {d, Divisors[n] // Rest}]; a[0] = 1; a[n_] := b[n] + b[n-1]; Table[a[n], {n, 0, 84}] (* Jean-François Alcover, Mar 26 2013, after Alois P. Heinz *)
  • PARI
    { a(n,m=0) = local(r=0); if(n==0,return(1)); fordiv(n,d, if(d<=m,next); r+=a((n-d)\d,1); ); r } /* Max Alekseyev */

Formula

For n>0, a(n) = A167865(n) + A167865(n-1).

Extensions

More terms from R. J. Mathar, May 22 2009
a(0)=1 prepended by Max Alekseyev, Nov 13 2009

A167866 Length of the longest partition of n into distinct parts greater than 1, with each part divisible by the next one.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 3, 3, 3, 1, 2, 2, 3, 3, 3, 1, 4, 1, 3, 3, 3, 3, 3, 1, 4, 3, 3, 1, 4, 1, 4, 4, 4, 1, 3, 3, 3, 3, 3, 1, 4, 3, 4, 4, 4, 1, 4, 1, 5, 4, 3, 3, 4, 1, 4, 4, 4, 1, 4, 1, 4, 4, 4, 3, 5, 1, 4, 4, 4, 1, 4, 3, 5, 4, 4, 1, 5, 3, 5, 5, 5, 4, 3, 1, 4, 4, 4, 1, 4, 1, 4
Offset: 0

Views

Author

Max Alekseyev, Nov 13 2009

Keywords

Comments

Formally speaking, a(1) is not defined but letting a(1)=0 does not break any formula.

Crossrefs

Programs

  • PARI
    { A167866(n) = local(r=0); if(n<=1,return(0)); fordiv(n,d, if(d>1, r=max(r,A167866((n-d)\d)); ); ); r+1 }

Formula

a(0) = a(1) = 0 and for n>=2, a(n) = 1 + max_{d|n, d>1} a((n-d)/d).
Showing 1-3 of 3 results.