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.

A050370 Number of ways to factor n into composite factors.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 1, 1, 0, 1, 0, 2, 1, 1, 1, 3, 0, 1, 1, 2, 0, 1, 0, 1, 1, 1, 0, 3, 1, 1, 1, 1, 0, 2, 1, 2, 1, 1, 0, 3, 0, 1, 1, 4, 1, 1, 0, 1, 1, 1, 0, 4, 0, 1, 1, 1, 1, 1, 0, 3, 2, 1, 0, 3, 1, 1, 1, 2, 0, 3, 1, 1, 1, 1, 1, 5, 0, 1, 1, 3, 0, 1
Offset: 1

Views

Author

Christian G. Bower, Nov 15 1999

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

Crossrefs

Programs

  • 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:
    a:= proc(n) a(n):= add(mobius(n/d)*g(d$2), d=divisors(n)) end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 16 2014
  • 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}}]]; a[n_] := Sum[ MoebiusMu[n/d]*g[d, d], {d, Divisors[n]}]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 23 2017, after Alois P. Heinz *)
  • Python
    from sympy.core.cache import cacheit
    from sympy import mobius, divisors, isprime
    @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]))
    def a(n): return sum(mobius(n//d)*g(d, d) for d in divisors(n))
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Aug 19 2017, after Maple code

Formula

Dirichlet g.f.: Product_{n is composite}(1/(1-1/n^s)).
Moebius transform of A001055. - Vladeta Jovovic, Mar 17 2004

A376679 Number of strict integer factorizations of n into nonsquarefree factors > 1.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 1, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2024

Keywords

Examples

			The a(3456) = 28 factorizations are:
  (4*8*9*12)  (4*9*96)    (36*96)   (3456)
              (8*9*48)    (4*864)
              (4*12*72)   (48*72)
              (4*16*54)   (54*64)
              (4*18*48)   (8*432)
              (4*24*36)   (9*384)
              (4*27*32)   (12*288)
              (4*8*108)   (16*216)
              (8*12*36)   (18*192)
              (8*16*27)   (24*144)
              (8*18*24)   (27*128)
              (9*12*32)   (32*108)
              (9*16*24)
              (12*16*18)
		

Crossrefs

Positions of zeros are A005117 (squarefree numbers), complement A013929.
For squarefree instead of nonsquarefree we have A050326, non-strict A050320.
For prime-powers we have A050361, non-strict A000688.
For nonprime numbers we have A050372, non-strict A050370.
The version for partitions is A256012, non-strict A114374.
For perfect-powers we have A323090, non-strict A294068.
The non-strict version is A376657.
Nonsquarefree numbers:
- A078147 (first differences)
- A376593 (second differences)
- A376594 (inflections and undulations)
- A376595 (nonzero curvature)
A000040 lists the prime numbers, differences A001223.
A001055 counts integer factorizations, strict A045778.
A005117 lists squarefree numbers, differences A076259.
A317829 counts factorizations of superprimorials, strict A337069.

Programs

  • JavaScript
    function nextNonSquareFree(val){val+=1;for(let i=2;i*i<=val;i+=1){if(val%i==0&&val%(i*i)==0){return val}}return nextNonSquareFree(val)}function strictFactorCount(val,maxFactor){if(val==1){return 1}let sum=0;while(maxFactorDominic McCarty, Oct 19 2024
  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],UnsameQ@@#&&NoneTrue[#,SquareFreeQ]&]],{n,100}] (* corrected by Gus Wiseman, Jun 27 2025 *)

A050373 Number of factorizations into distinct composite numbers indexed by prime signatures.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 3, 2, 4, 4, 5, 3, 5, 6, 6, 4, 7, 8, 3, 9, 11, 8, 8, 11, 13, 5, 12, 19, 11, 16, 17, 12, 19, 5, 22, 18, 19, 17, 30, 14, 28, 26, 26, 28, 7, 38, 24, 11, 39, 29, 47, 19, 46, 37, 44, 39, 8, 64, 34, 28, 70, 44, 53, 70, 24, 47, 69, 73, 53, 76, 82, 55, 48, 10
Offset: 1

Views

Author

Christian G. Bower, Nov 15 1999

Keywords

Crossrefs

Extensions

More terms from Naohiro Nomoto, Nov 07 2001
Corrected by Alois P. Heinz, May 26 2013
Showing 1-3 of 3 results.