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-7 of 7 results.

A033630 Number of partitions of n into distinct divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 6, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 8, 1, 1, 1, 4, 1, 3, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 4, 1, 3, 1, 1, 1, 35, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 32, 1, 1, 1, 1, 1, 2, 1, 7, 1, 1, 1, 26, 1, 1, 1, 2, 1, 24, 1, 1, 1, 1, 1, 22, 1, 1, 1, 3
Offset: 0

Views

Author

Keywords

Examples

			a(12) = 3 because we have the partitions [12], [6, 4, 2], and [6, 3, 2, 1].
		

Crossrefs

Programs

  • Haskell
    a033630 0 = 1
    a033630 n = p (a027750_row n) n where
       p _  0 = 1
       p [] _ = 0
       p (d:ds) m = if d > m then 0 else p ds (m - d) + p ds m
    -- Reinhard Zumkeller, Feb 23 2014, Apr 04 2012, Oct 27 2011
  • Maple
    with(numtheory): a:=proc(n) local div, g, gser: div:=divisors(n): g:=product(1+x^div[j],j=1..tau(n)): gser:=series(g,x=0,105): coeff(gser,x^n): end: seq(a(n),n=1..100); # Emeric Deutsch, Mar 30 2006
    # second Maple program:
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(divisors(n))[]]):
          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-1))))
              end; forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..100); # Alois P. Heinz, Feb 05 2014
  • Mathematica
    A033630 = Table[SeriesCoefficient[Series[Times@@((1 + z^#) & /@ Divisors[n]), {z, 0, n}], n ], {n, 512}] (* Wouter Meeussen *)
    A033630[n_] := f[n, n, 1]; f[n_, m_, k_] := f[n, m, k] = If[k <= m, f[n, m, k + 1] + f[n, m - k, k + 1] * Boole[Mod[n, k] == 0], Boole[m == 0]]; Array[A033630, 101, 0] (* Jean-François Alcover, Jul 29 2015, after Reinhard Zumkeller *)

Formula

a(n) = A065205(n) + 1.
a(A005100(n)) = 1; a(A005835(n)) > 1. - Reinhard Zumkeller, Mar 02 2007
a(n) = f(n, n, 1) with f(n, m, k) = if k <= m then f(n, m, k + 1) + f(n, m - k, k + 1)*0^(n mod k) else 0^m. - Reinhard Zumkeller, Dec 11 2009
a(n) = [x^n] Product_{d|n} (1 + x^d). - Ilya Gutkovskiy, Jul 26 2017
a(n) = 1 if n is deficient (A005100) or weird (A006037). a(n) = 2 if n is perfect (A000396). - Alonso del Arte, Sep 24 2017

Extensions

More terms from Reinhard Zumkeller, Apr 21 2003

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

A136446 Numbers n such that some subset of the numbers { 1 < d < n : d divides n } adds up to n.

Original entry on oeis.org

12, 18, 24, 30, 36, 40, 42, 48, 54, 56, 60, 66, 72, 78, 80, 84, 90, 96, 100, 102, 108, 112, 114, 120, 126, 132, 138, 140, 144, 150, 156, 160, 162, 168, 174, 176, 180, 186, 192, 196, 198, 200, 204, 208, 210, 216, 220, 222, 224, 228, 234, 240, 246
Offset: 1

Views

Author

Joerg Arndt, Apr 06 2008

Keywords

Comments

This is a subset of the pseudoperfect numbers A005835 and thus non-deficient (A023196), but in view of the definition actually abundant numbers (A005101). Sequence A122036 lists odd abundant numbers (A005231) which are not in this sequence. So far, 351351 is the only one we know. (As of today, no odd weird (A006037: abundant but not pseudoperfect) number is known.) - M. F. Hasler, Apr 13 2008
This sequence contains infinitely many odd elements: any proper multiple of any pseudoperfect number is in the sequence, so odd proper multiples of odd pseudoperfect numbers are in the sequence. The first such is 2835 = 3 * 945 (which is in the b-file). - Franklin T. Adams-Watters, Jun 18 2009
A211111(a(n)) > 1. - Reinhard Zumkeller, Apr 04 2012

References

  • Mladen Vassilev, Two theorems concerning divisors, Bull. Number Theory Related Topics 12 (1988), pp. 10-19.

Crossrefs

See A005835 (allowing for divisor 1).

Programs

  • Haskell
    a136446 n = a136446_list !! (n-1)
    a136446_list = map (+ 1) $ findIndices (> 1) a211111_list
    -- Reinhard Zumkeller, Apr 04 2012
    
  • Maple
    isA136446a := proc(s,n) if n in s then return true; elif add(i,i=s) < n then return false; elif nops(s) = 1 then is(op(1,s)=n) ; else sl := sort(convert(s,list),`>`) ; for i from 1 to nops(sl) do m := op(i,sl) ; if n -m = 0 then return true; end if ; if n-m > 0 then sr := [op(i+1..nops(sl),sl)] ; if procname(convert(sr,set),n-m) then return true; end if; end if; end do; return false; end if; end proc:
    isA136446 := proc(n) isA136446a( numtheory[divisors](n) minus {1,n},n) ; end proc:
    for n from 1 to 400 do if isA136446(n) then printf("%d,",n) ; end if; end do ; # R. J. Mathar, Mar 20 2011
  • Mathematica
    okQ[n_] := Module[{d}, If[PrimeQ[n], False, d = Most[Rest[Divisors[n]]]; MemberQ[Plus @@@ Subsets[d], n]]]; Select[Range[2, 246], okQ]
    (* T. D. Noe, Jul 24 2012 *)
  • PARI
    N=72 \\ up to this value
    vv=vector(N);
    { for(n=2, N,
    if ( isprime(n), next() );
    d=divisors(n);
    d=vector(#d-2,j,d[j+1]); \\ not n, not 1
    for (k=1, (1<<#d)-1, \\ all subsets
    t=vecextract(d, k);
    if ( n==sum(j=1,#t,t[j]),
    vv[n] += 1;););); }
    for (j=1, #vv, if (vv[j]>0, print1(j,", "))) \\ A005835 (after correction)
    
  • PARI
    is_A136446(n,d=divisors(n))={#d>2 && is_A005835(n,d[2..-2])} \\ Replaced old code not conforming to current PARI syntax. - M. F. Hasler, Jul 28 2016
    for( n=1,10^4, is_A136446(n) && print1(n", ")) \\ M. F. Hasler, Apr 13 2008
    
  • Sage
    def isa(s, n): # After R. J. Mathar's Maple code
        if n in s: return True
        if sum(s) < n: return False
        if len(s) == 1: return s[0] == n
        for i in srange(len(s)-1,-1,-1) :
            d = n - s[i]
            if d == 0: return True
            if d >  0:
                if isa(s[i+1:], d): return True
        return False
    isA136446 = lambda n : isa(divisors(n)[1:-1], n)
    [n for n in (1..246) if isA136446(n)]
    # Peter Luschny, Jul 23 2012

Extensions

More terms from M. F. Hasler, Apr 13 2008

A293814 Number of partitions of n into distinct nontrivial divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 18, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 13, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 10, 0, 0, 0, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 16 2017

Keywords

Examples

			a(24) = 2 because 24 has 8 divisors {1, 2, 3, 4, 6, 8, 12, 24} among which 6 are nontrivial divisors {2, 3, 4, 6, 8, 12} therefore we have [12, 8, 4] and [12, 6, 4, 2].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1, n})[]]):
          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-1))))
              end; forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Oct 16 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[Product[1 + Boole[d[[k]] != 1 && d[[k]] != n] x^d[[k]], {k, Length[d]}], {x, 0, n}], x, n], {n, 0, 100}]
  • PARI
    A293814(n) = { if(!n,return(1)); my(p=1); fordiv(n,d,if(d>1&&dAntti Karttunen, Dec 22 2017
    
  • Scheme
    ;; Implements a simple backtracking algorithm:
    (define (A293814 n) (if (<= n 1) (- 1 n) (let ((s (list 0))) (let fork ((r n) (divs (cdr (proper-divisors n)))) (cond ((zero? r) (set-car! s (+ 1 (car s)))) ((or (null? divs) (> (car divs) r)) #f) (else (begin (fork (- r (car divs)) (cdr divs)) (fork r (cdr divs)))))) (car s))))
    (define (proper-divisors n) (reverse (cdr (reverse (divisors n)))))
    (define (divisors n) (let loop ((k n) (divs (list))) (cond ((zero? k) divs) ((zero? (modulo n k)) (loop (- k 1) (cons k divs))) (else (loop (- k 1) divs)))))
    ;; Antti Karttunen, Dec 22 2017

Formula

a(n) = [x^n] Product_{d|n, 1 < d < n} (1 + x^d).
a(n) = A211111(n) - 1 for n > 1.

A331927 Number of compositions (ordered partitions) of n into distinct divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 31, 1, 1, 1, 1, 1, 31, 1, 25, 1, 1, 1, 895, 1, 1, 1, 121, 1, 151, 1, 1, 1, 1, 1, 1135, 1, 1, 1, 865, 1, 31, 1, 1, 1, 1, 1, 11935, 1, 1, 1, 1, 1, 151, 1, 841, 1, 1, 1, 129439, 1, 1, 1, 1, 1, 127, 1, 1, 1, 1
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2020

Keywords

Examples

			a(6) = 7 because we have [6], [3, 2, 1], [3, 1, 2], [2, 3, 1], [2, 1, 3], [1, 3, 2] and [1, 2, 3].
		

Crossrefs

Programs

  • PARI
    a(n)={if(n==0, 1, my(v=divisors(n)); subst(serlaplace(polcoef(prod(i=1, #v, 1 + y*x^v[i] + O(x*x^n)), n)), y, 1))} \\ Andrew Howroyd, Feb 01 2020

Formula

a(n) = A331928(n) + 1 for n > 0.

A331928 Number of compositions (ordered partitions) of n into distinct proper divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 30, 0, 24, 0, 0, 0, 894, 0, 0, 0, 120, 0, 150, 0, 0, 0, 0, 0, 1134, 0, 0, 0, 864, 0, 30, 0, 0, 0, 0, 0, 11934, 0, 0, 0, 0, 0, 150, 0, 840, 0, 0, 0, 129438, 0, 0, 0, 0, 0, 126, 0, 0, 0, 0
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2020

Keywords

Examples

			a(6) = 6 because we have [3, 2, 1], [3, 1, 2], [2, 3, 1], [2, 1, 3], [1, 3, 2] and [1, 2, 3].
		

Crossrefs

Programs

  • PARI
    a(n)={if(n==0, 1, my(v=divisors(n)); subst(serlaplace((0*y) + polcoef(prod(i=1, #v-1, 1 + y*x^v[i] + O(x*x^n)), n)), y, 1))} \\ Andrew Howroyd, Feb 01 2020

Formula

a(n) = A331927(n) - 1 for n > 0.

A331979 Number of compositions (ordered partitions) of n into distinct nontrivial divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 894, 0, 0, 0, 24, 0, 6, 0, 0, 0, 0, 0, 894, 0, 0, 0, 0, 0, 30, 0, 120, 0, 0, 0, 19518, 0, 0, 0, 0, 0, 126, 0, 0, 0, 0, 0, 18558, 0, 0, 0, 0, 0, 6, 0, 864
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

			a(12) = 6 because we have [6, 4, 2], [6, 2, 4], [4, 6, 2], [4, 2, 6], [2, 6, 4] and [2, 4, 6].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) local b, l; l:= sort([(divisors(n) minus {1, n})[]]):
          b:= proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<1, 0,
                 b(m, i-1, p)+`if`(l[i]>m, 0, b(m-l[i], i-1, p+1))))
              end; forget(b):
          b(n, nops(l), 0)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 03 2020
  • Mathematica
    a[n_] := If[n == 0, 1, Module[{b, l = Divisors[n] ~Complement~ {1, n}}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 1, 0, b[m, i-1, p] + If[l[[i]] > m, 0, b[m - l[[i]], i-1, p+1]]]]; b[n, Length[l], 0]]];
    a /@ Range[0, 100] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)
Showing 1-7 of 7 results.