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

A057567 Number of partitions of n where the product of parts divides n.

Original entry on oeis.org

1, 2, 2, 4, 2, 5, 2, 7, 4, 5, 2, 11, 2, 5, 5, 12, 2, 11, 2, 11, 5, 5, 2, 21, 4, 5, 7, 11, 2, 15, 2, 19, 5, 5, 5, 26, 2, 5, 5, 21, 2, 15, 2, 11, 11, 5, 2, 38, 4, 11, 5, 11, 2, 21, 5, 21, 5, 5, 2, 36, 2, 5, 11, 30, 5, 15, 2, 11, 5, 15, 2, 52, 2, 5, 11, 11, 5, 15, 2, 38, 12, 5, 2, 36, 5, 5, 5, 21
Offset: 1

Views

Author

Leroy Quet, Oct 04 2000

Keywords

Comments

a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24=2^3*3 and 375=3*5^3 both have prime signature (3,1). - Christian G. Bower, Jun 03 2005

Examples

			From _Gus Wiseman_, Jul 04 2019: (Start)
The a(1) = 1 through a(9) = 5 partitions are the following. The Heinz numbers of these partitions are given by A326155.
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (11111)  (321)     (1111111)  (4211)
                    (211)            (3111)               (22211)
                    (1111)           (21111)              (41111)
                                     (111111)             (221111)
                                                          (2111111)
                                                          (11111111)
(End)
		

Crossrefs

Any prime numbered column of array A108461.

Programs

  • Mathematica
    Table[Function[m, Count[Map[Times @@ # &, IntegerPartitions[m]], P_ /; Divisible[m, P]] - Boole[n == 1]]@ Apply[Times, #] &@ MapIndexed[Prime[First@ #2]^#1 &, Sort[FactorInteger[n][[All, -1]], Greater]], {n, 88}] (* Michael De Vlieger, Aug 16 2017 *)
  • PARI
    fcnt(n, m) = {local(s); s=0; if(n == 1, s=1, fordiv(n, d, if(d > 1 & d <= m, s=s+fcnt(n/d, d)))); s}
    A001055(n) = fcnt(n, n) \\ This function from Michael B. Porter, Oct 29 2009
    A057567(n) = sumdiv(n, d, A001055(d)); \\ After Jovovic's formula. Antti Karttunen, May 25 2017
    
  • Python
    from sympy import divisors, isprime
    def T(n, m):
        if isprime(n): return 1 if n <= m else 0
        A = (d for d in divisors(n) if 1 < d < n and d <= m)
        s = sum(T(n // d, d) for d in A)
        return s + 1 if n <= m else s
    def a001055(n): return T(n, n)
    def a(n): return sum(a001055(d) for d in divisors(n))
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Aug 19 2017

Formula

a(n) = Sum_{d|n} A001055(d). - Vladeta Jovovic, Nov 19 2000
a(A025487(n)) = A108464(n).
a(p^k) = A000070(k).
a(A002110(n)) = A000110(n+1).
Dirichlet g.f.: zeta(s) * Product_{k>=2} 1/(1 - 1/k^s). - Ilya Gutkovskiy, Nov 03 2020

Extensions

More terms from James Sellers, Oct 09 2000
More terms from Vladeta Jovovic, Nov 19 2000

A057568 Number of partitions of n where n divides the product of the parts.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 6, 5, 5, 1, 22, 1, 11, 23, 80, 1, 113, 1, 150, 85, 45, 1, 737, 226, 84, 809, 726, 1, 1787, 1, 4261, 735, 260, 1925, 9567, 1, 437, 1877, 16402, 1, 14630, 1, 9861, 33057, 1152, 1, 102082, 19393, 57330, 10159, 30706, 1, 207706, 47927, 200652
Offset: 1

Views

Author

Leroy Quet, Oct 04 2000

Keywords

Examples

			From _Gus Wiseman_, Jul 04 2019: (Start)
The a(1) = 1 through a(9) = 5 partitions are the following. The Heinz numbers of these partitions are given by A326149.
  (1)  (2)  (3)  (4)   (5)  (6)    (7)  (8)      (9)
                 (22)       (321)       (44)     (63)
                                        (422)    (333)
                                        (2222)   (3321)
                                        (4211)   (33111)
                                        (22211)
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
          `if`(t=1, 1, 0), `if`(i<1, 0, b(n, i-1, t)+
          `if`(i>n, 0, b(n-i, min(i, n-i), t/igcd(i, t)))))
        end:
    a:= n-> `if`(isprime(n), 1, b(n$3)):
    seq(a(n), n=1..70);  # Alois P. Heinz, Dec 20 2017
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Divisible[Times@@#,n]&]],{n,20}] (* Gus Wiseman, Jul 04 2019 *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t == 1, 1, 0], If[i < 1, 0, b[n, i - 1, t] + If[i > n, 0, b[n - i, Min[i, n - i], t/GCD[i, t]]]]];
    a[n_] := If[PrimeQ[n], 1, b[n, n, n]];
    Array[a, 70] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)
  • Scheme
    ;; This is a naive algorithm that scans over all partitions of each n. For fold_over_partitions_of see A000793.
    (define (A057568 n) (let ((z (list 0))) (fold_over_partitions_of n 1 * (lambda (partprod) (if (zero? (modulo partprod n)) (set-car! z (+ 1 (car z)))))) (car z)))
    ;; Antti Karttunen, Dec 20 2017

Extensions

More terms from James Sellers, Oct 09 2000

A113308 a(n) = the number of finite sequences of positive integers {b(k)} where (product b(k))* (sum b(k)) = n. Different orderings of the same integers are counted separately.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 8, 1, 7, 4, 10, 1, 13, 1, 15, 6, 11, 1, 27, 2, 13, 8, 28, 1, 27, 1, 36, 10, 17, 4, 62, 1, 19, 12, 59, 1, 47, 1, 66, 19, 23, 1, 118, 2, 31, 16, 91, 1, 78, 8, 117, 18, 29, 1, 193, 1, 31, 26, 159, 10, 115, 1, 153, 22, 51, 1, 320, 1, 37, 35, 190, 6, 161, 1
Offset: 1

Views

Author

Leroy Quet, Oct 25 2005

Keywords

Comments

Sequence's terms calculated by "Max".

Examples

			6 = 1*1*1*1*1*1*(1+1+1+1+1+1) = 1*2*(1+2) = 2*1*(2+1). So a(6) = 3.
		

Crossrefs

Cf. A113309.

Programs

  • Mathematica
    (* first do *) Needs["DiscreteMath`Combinatorica`"] ( then *) t = Table[1, {80}]; Do[k = 1; lmt = PartitionsP@n; p = Partitions@n; While[k < lmt, a = Plus @@ p[[k]]*Times @@ p[[k]]; If[a < 81, t[[a]] += Length@ Permutations@ p[[k]]]; k++ ], {n, 40}]; t (* Robert G. Wilson v, May 03 2006 *)

Formula

a(n)=1 if n=1 or is a prime, a(2)=2 if n is the square of a prime. - Robert G. Wilson v
Showing 1-3 of 3 results.