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.

A211110 Number of partitions of n into divisors > 1 of n.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 12, 1, 3, 3, 10, 1, 15, 1, 16, 3, 3, 1, 80, 2, 3, 5, 20, 1, 94, 1, 36, 3, 3, 3, 280, 1, 3, 3, 158, 1, 154, 1, 28, 25, 3, 1, 1076, 2, 29, 3, 32, 1, 255, 3, 262, 3, 3, 1, 7026, 1, 3, 32, 202, 3, 321, 1, 40, 3, 302, 1, 12072, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 01 2012

Keywords

Comments

a(A000040(n)) = 1; a(A002808(n)) > 1;
a(A001248(n)) = 2; a(A080257(n)) > 2;
a(A006881(n)) = 3; a(A033942(n)) > 3.

Examples

			a(10) = #{10, 5+5, 2+2+2+2+2} = 3;
a(11) = #{11} = 1;
a(12) = #{12, 6+6, 6+4+2, 6+3+3, 6+2+2+2, 4+4+4, 4+4+2+2, 4+3+3+2, 4+2+2+2+2, 3+3+3+3, 3+3+2+2+2, 6x2} = 12;
a(13) = #{13} = 1;
a(14) = #{14, 7+7, 2+2+2+2+2+2+2} = 3;
a(15) = #{15, 5+5+5, 3+3+3+3+3} = 3.
		

Crossrefs

Programs

  • Haskell
    a211110 n = p (tail $ a027750_row n) n where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m | m < k     = 0
                      | otherwise = p ks' (m - k) + p ks m
    
  • Maple
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1})[]]):
          b:= proc(m, i) option remember; `if`(m=0, 1, `if`(i<1, 0,
                 b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i))))
              end; forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..100); # Alois P. Heinz, Feb 05 2014
  • Mathematica
    a[n_] := Module[{b, l}, l = Rest[Divisors[n]]; b[m_, i_] := b[m, i] = If[m==0, 1, If[i<1, 0, b[m, i-1] + If[l[[i]]>m, 0, b[m-l[[i]], i]]]]; b[n, Length[l]]]; a[0] = 1; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 30 2015, after Alois P. Heinz *)
  • PARI
    isokp(p, n) = {for (k=1, #p, if ((p[k]==1) || (n % p[k]), return (0));); return (1);}
    a(n) = {my(nb = 0); forpart(p=n, if (isokp(p,n), nb++)); nb;} \\ Michel Marcus, Jun 30 2015