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

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.

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

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 5, 1, 2, 0, 50, 0, 2, 2, 55, 0, 185, 0, 243, 2, 2, 0, 8903, 1, 2, 19, 1219, 0, 48824, 0, 5271, 2, 2, 2, 1323569, 0, 2, 2, 369182, 0, 1659512, 0, 36636, 5111, 2, 0, 254187394, 1, 53535, 2, 223502, 0, 65005979, 2, 16774462, 2, 2, 0, 235105418684, 0, 2, 41386, 47350055, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 23 2017

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[d[[k]] != 1 && d[[k]] != n] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 0, 65}]

Formula

a(n) = [x^n] 1/(1 - Sum_{d|n, 1 < d < n} x^d).

A327642 Number of partitions of n into divisors of n that are at most sqrt(n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 4, 1, 5, 4, 6, 1, 19, 1, 8, 6, 25, 1, 37, 1, 36, 8, 12, 1, 169, 6, 14, 10, 64, 1, 247, 1, 81, 12, 18, 8, 1072, 1, 20, 14, 405, 1, 512, 1, 144, 82, 24, 1, 2825, 8, 146, 18, 196, 1, 1000, 12, 743, 20, 30, 1, 19858, 1, 32, 112, 969, 14, 1728, 1, 324, 24, 1105
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 20 2019

Keywords

Comments

a(n) > n if n is in A058080 Union {0}, and, a(n) <= n if n is in A007964; indeed, a(n) = n only for n = 1. - Bernard Schott, Sep 22 2019

Examples

			The divisors of 6 are 1, 2, 3, 6 and sqrt(6) = 2.449..., so the possible partitions are 1+1+1+1+1+1 = 1+1+1+1+2 = 1+1+2+2 = 2+2+2; thus a(6) = 4. - _Bernard Schott_, Sep 22 2019
		

Crossrefs

Programs

  • Magma
    [1] cat [#RestrictedPartitions(n,{d:d in Divisors(n)| d le Sqrt(n)}):n in [1..70]]; // Marius A. Burtea, Sep 20 2019
  • Maple
    f:= proc(n) local x, t, S;
        S:= 1;
        for t in numtheory:-divisors(n) do
          if t^2 <= n then
            S:= series(S/(1-x^t),x,n+1);
          fi
        od;
        coeff(S,x,n);
    end proc:
    map(f, [$0..100]); # Robert Israel, Sep 22 2019
  • Mathematica
    a[n_] := SeriesCoefficient[Product[1/(1 - Boole[d <= Sqrt[n]] x^d), {d, Divisors[n]}], {x, 0, n}]; Table[a[n], {n, 0, 70}]

Formula

a(n) = [x^n] Product_{d|n, d <= sqrt(n)} 1 / (1 - x^d).
a(p) = 1, where p is prime.
a(p*q) = q+1 if p <= q are primes. - Robert Israel, Sep 22 2019

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 *)

A357311 Number of partitions of n into divisors of n that are smaller than sqrt(n).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 4, 1, 5, 1, 6, 1, 19, 1, 8, 6, 9, 1, 37, 1, 36, 8, 12, 1, 169, 1, 14, 10, 64, 1, 247, 1, 81, 12, 18, 8, 478, 1, 20, 14, 405, 1, 512, 1, 144, 82, 24, 1, 2825, 1, 146, 18, 196, 1, 1000, 12, 743, 20, 30, 1, 19858, 1, 32, 112, 289, 14, 1728, 1, 324, 24, 1105
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 23 2022

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; uses numtheory; local b, l;
          l:= sort([select(x-> is(xm, 0, b(m-l[i], i))))
              end; forget(b):
          b(n, nops(l))
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Sep 23 2022
  • Mathematica
    a[n_] := SeriesCoefficient[Product[1/(1 - Boole[d < Sqrt[n]] x^d), {d, Divisors[n]}], {x, 0, n}]; Table[a[n], {n, 0, 70}]

Formula

a(n) = [x^n] Product_{d|n, d < sqrt(n)} 1 / (1 - x^d).
Showing 1-5 of 5 results.