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.

A200745 Number of partitions of n into distinct non-divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 2, 1, 2, 2, 6, 1, 9, 5, 6, 5, 20, 4, 28, 7, 19, 24, 55, 6, 51, 45, 49, 27, 136, 16, 180, 50, 117, 143, 146, 28, 403, 242, 260, 68, 668, 91, 852, 246, 260, 649, 1370, 90, 1191, 493, 1110, 634, 2701, 386, 1635, 462, 2160, 2486, 5154, 167
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 22 2011

Keywords

Examples

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

Crossrefs

Programs

  • Haskell
    a200745 n = p [nd | nd <- [1..n], mod n nd /= 0] n where
       p _  0 = 1
       p [] _ = 0
       p (k:ks) m | m < k = 0 | otherwise = p ks (m - k) + p ks m
  • Maple
    a:= proc(n) option remember; local b, l;
          l:= sort([({$1..n} minus numtheory[divisors](n))[]]);
          b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
                 b(n, i-1) +`if`(l[i]>n, 0, b(n-l[i], i-1))))
              end: forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Jan 18 2013
  • Mathematica
    a[0] = 1; a[n_] := a[n] = Module[{b, l}, l = Sort[Range[n] ~Complement~ 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 - 1]]]]; b[n, Length[l]]];
    Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Feb 06 2017, after Alois P. Heinz *)