login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035310 Let f(n) = number of ways to factor n = A001055(n); a(n) = sum of f(k) over all terms k in A025487 that have n factors. 12
1, 4, 12, 47, 170, 750, 3255, 16010, 81199, 448156, 2579626, 15913058, 102488024, 698976419, 4976098729 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Ways of partitioning an n-multiset with multiplicities some partition of n.

LINKS

Table of n, a(n) for n=1..15.

EXAMPLE

a(3) = 12 because there are 3 terms in A025487 with 3 factors, namely 8, 12, 30; and f(8)=3, f(12)=4, f(30)=5 and 3+4+5 = 12.

MAPLE

with(numtheory):

g:= proc(n, k) option remember;

      `if`(n>k, 0, 1) +`if`(isprime(n), 0,

      add(`if`(d>k, 0, g(n/d, d)), d=divisors(n) minus {1, n}))

    end:

b:= proc(n, i, l)

      `if`(n=0, g(mul(ithprime(t)^l[t], t=1..nops(l))$2),

      `if`(i<1, 0, add(b(n-i*j, i-1, [l[], i$j]), j=0..n/i)))

    end:

a:= n-> b(n$2, []):

seq(a(n), n=1..10);  # Alois P. Heinz, May 26 2013

MATHEMATICA

g[n_, k_] := g[n, k] = If[n > k, 0, 1] + If[PrimeQ[n], 0, Sum[If[d > k, 0, g[n/d, d]], {d, Divisors[n] ~Complement~ {1, n}}]]; b[n_, i_, l_] := If[n == 0, g[p = Product[Prime[t]^l[[t]], {t, 1, Length[l]}], p], If[i < 1, 0, Sum[b[n - i*j, i-1, Join[l, Array[i&, j]]], {j, 0, n/i}]]]; a[n_] := b[n, n, {}]; Table[Print[an = a[n]]; an, {n, 1, 13}] (* Jean-Fran├žois Alcover, Dec 12 2013, after Alois P. Heinz *)

PROG

(Python)

from sympy.core.cache import cacheit

from sympy import divisors, isprime, prime

from operator import mul

@cacheit

def g(n, k): return (0 if n>k else 1) + (0 if isprime(n) else sum([0 if d>k else g(n/d, d) for d in divisors(n)[1:-1]]))

@cacheit

def b(n, i, l):

    if n==0:

        p=reduce(mul, [prime(t + 1)**l[t] for t in xrange(len(l))])

        return g(p, p)

    else: return 0 if i<1 else sum([b(n - i*j, i - 1, l + [i]*j) for j in xrange(n/i + 1)])

def a(n): return b(n, n, [])

for n in xrange(1, 11): print a(n) # Indranil Ghosh, Aug 19 2017, after Maple code

CROSSREFS

Cf. A025487, A000041, A000110, A035098, A080688.

Sequence A035341 counts the ordered cases. Tables A093936 and A095705 distribute the values; e.g. 81199 = 30 + 536 + 3036 + 6181 + 10726 + 11913 + 14548 + 13082 + 21147.

Cf. A035341, A093936, A095705.

Sequence in context: A000775 A149374 A149375 * A022016 A151441 A032380

Adjacent sequences:  A035307 A035308 A035309 * A035311 A035312 A035313

KEYWORD

nonn,more,nice

AUTHOR

Alford Arnold

EXTENSIONS

More terms from Erich Friedman.

81199 from Alford Arnold, Mar 04 2008

a(10) from Alford Arnold, Mar 31 2008

a(10) corrected by Alford Arnold, Aug 07 2008

a(11)-a(13) from Alois P. Heinz, May 26 2013

a(14) from Alois P. Heinz, Sep 27 2014

a(15) from Alois P. Heinz, Jan 10 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 19 06:47 EDT 2019. Contains 324218 sequences. (Running on oeis4.)