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.

A117621 Number of double-perfect partitions of [1..n].

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 3, 1, 3, 2, 3, 1, 7, 1, 3, 3, 6, 1, 8, 1, 7, 3, 3, 1, 17, 2, 3, 4, 7, 1, 13, 1, 12, 3, 3, 3, 24, 1, 3, 3, 17, 1, 13, 1, 7, 8, 3, 1, 40, 2, 8, 3, 7, 1, 20, 3, 17, 3, 3, 1, 41, 1, 3, 8, 24, 3, 13, 1, 7, 3, 13, 1, 68, 1, 3, 8, 7, 3, 13, 1, 40, 8, 3, 1, 41, 3, 3, 3, 17, 1, 44, 3, 7, 3, 3, 3
Offset: 1

Views

Author

N. J. A. Sloane, Apr 07 2006

Keywords

Crossrefs

Cf. A002033.

Programs

  • Maple
    f:=proc(n) option remember; local t1,m,nm1,mm1; nm1:=n-1; if n <= 1 then RETURN(0); elif n <= 5 then RETURN(1); else t1:=0; for m from 2 to n-1 do mm1:=m-1; if nm1 mod mm1 = 0 then t1:=t1+f(m); fi; od; RETURN(t1); fi; end;
    # second Maple program:
    with(numtheory):
    a:= proc(n) option remember; `if`(n<6, [0, 1$4][n],
          add(a(k+1), k=divisors(n-1) minus {n-1}))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 09 2015
  • Mathematica
    a[n_] := a[n] = If[n<6, {0, 1, 1, 1, 1}[[n]], Sum[a[k+1], {k, Divisors[n-1] ~Complement~ {n-1}}]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)

Formula

a(1)=0; a(n)=1 for n=2..5; a(n) = Sum_{m=2..n-1, m-1|n-1} a(m) for n >= 6.