OFFSET
1,4
COMMENTS
Sequence's terms calculated by "Max".
First occurrence: 1, 4, 12, 16, 24, 54, 36, 60, 48, 84, 72, 108, 96, ..., . - Robert G. Wilson v, May 03 2006
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000 (first 4096 terms from Antti Karttunen)
FORMULA
a(n) = 1 iff n = 1 or n is a prime. a(n) = 2 if n is a semiprime. - Robert G. Wilson v, May 03 2006
a(n) = Sum_{d|n} {number of partitions of d where product of parts = n/d}. - Antti Karttunen, Nov 03 2017
EXAMPLE
6 = (1*1*1*1*1*1) * (1+1+1+1+1+1) = (1*2) * (1+2). So a(6) = 2.
MATHEMATICA
t = Table[1, {104}]; Do[k = 1; lmt = PartitionsP[n]; p = IntegerPartitions[n]; While[k < lmt, a = Plus @@ p[[k]]*Times @@ p[[k]]; If[a < 105, t[[a]]++ ]; k++ ], {n, 52}]; t (* Robert G. Wilson v, May 03 2006 *)
PROG
(Scheme)
(define (A113309 n) (let ((z (list 0))) (let loop ((k n)) (cond ((zero? k) (car z)) ((not (zero? (modulo n k))) (loop (- k 1))) (else (begin (fold_over_partitions_with_uplim_cut k 1 * (lambda (partprod) (if (= n (* k partprod)) (set-car! z (+ 1 (car z))))) (/ n k)) (loop (- k 1))))))))
(define (fold_over_partitions_with_uplim_cut m initval addpartfun colfun uplim) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) ((> partition uplim) #f) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i)))))))) ;; This function is a modification of fold_over_partitions_of given in A000793.
;; Antti Karttunen, Nov 03 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 25 2005
EXTENSIONS
More terms from Robert G. Wilson v, May 03 2006
STATUS
approved