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-10 of 11 results. Next

A284345 Number of partitions of n into squares dividing n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 4, 1, 1, 1, 6, 1, 3, 1, 6, 1, 1, 1, 7, 2, 1, 4, 8, 1, 1, 1, 15, 1, 1, 1, 27, 1, 1, 1, 11, 1, 1, 1, 12, 6, 1, 1, 28, 2, 3, 1, 14, 1, 7, 1, 15, 1, 1, 1, 16, 1, 1, 8, 46, 1, 1, 1, 18, 1, 1, 1, 114, 1, 1, 4, 20, 1, 1, 1, 66, 11, 1, 1, 22, 1, 1, 1, 23, 1, 11, 1, 24, 1, 1, 1, 91, 1, 3, 12, 67
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 25 2017

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local b, l; l, b:=
          sort(select(issqr, [divisors(n)[]])),
          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))))
          end; b(n, nops(l))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 30 2017
  • Mathematica
    Join[{1}, Table[d = Divisors[n]; Coefficient[Series[Product[1/(1 - Boole[Mod[DivisorSigma[0, d[[k]]], 2] == 1] x^d[[k]]), {k, Length[d]}], {x, 0, n}], x, n], {n, 1, 100}]]

Formula

a(n) = [x^n] Product_{d^2|n} 1/(1 - x^(d^2)).
a(n) = 1 if n is a squarefree.
a(n) = 2 if n is a square of prime.

A014652 Number of partitions of n in its prime divisors with at least one part of size 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 5, 1, 4, 3, 8, 1, 16, 1, 11, 11, 8, 1, 33, 1, 26, 15, 17, 1, 56, 5, 20, 9, 36, 1, 226, 1, 16, 23, 26, 23, 120, 1, 29, 27, 92, 1, 422, 1, 56, 78, 35, 1, 208, 7, 140, 35, 66, 1, 261, 35, 128, 39, 44, 1, 1487, 1, 47, 108, 32, 41, 996, 1, 86, 47, 1062, 1, 456, 1, 56
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    \\ This is for computing just a moderate number of terms:
    prime_factors_with1_reversed(n) = vecsort(setunion([1],factor(n)[,1]~), , 4);
    partitions_into_with_trailing_ones(n,parts,from=1) = if(!n,1, if(#parts<=(from+1), if(#parts == from,1,(1+(n\parts[from]))), my(s=0); for(i=from,#parts,if(parts[i]<=n, s += partitions_into_with_trailing_ones(n-parts[i],parts,i))); (s)));
    A014652(n) = partitions_into_with_trailing_ones(n-1,prime_factors_with1_reversed(n)); \\ Antti Karttunen, Sep 10 2018
    
  • PARI
    \\ For an efficient program to compute large numbers of terms, see David A. Corneth's PARI program included in the Links section. - Antti Karttunen, Sep 12 2018

Formula

Coefficient of x^(n-1) in expansion of (1/(1-x))*1/Product_{d is prime divisor of n} (1-x^d). - Vladeta Jovovic, Apr 11 2004

A284289 Number of partitions of n into prime power divisors of n (not including 1).

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 2, 1, 4, 2, 2, 1, 7, 1, 2, 2, 10, 1, 7, 1, 10, 2, 2, 1, 34, 2, 2, 5, 13, 1, 21, 1, 36, 2, 2, 2, 72, 1, 2, 2, 73, 1, 28, 1, 19, 13, 2, 1, 249, 2, 10, 2, 22, 1, 50, 2, 127, 2, 2, 1, 419, 1, 2, 17, 202, 2, 42, 1, 28, 2, 43, 1, 1260, 1, 2, 13, 31, 2, 49, 1, 801, 23, 2, 1, 774, 2, 2, 2, 280, 1, 608
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 24 2017

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local b, l; l, b:= sort(
          [select(x-> nops(ifactors(x)[2])=1, divisors(n))[]]),
          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))))
          end; b(n, nops(l))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 30 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[Product[1/(1 - Boole[PrimePowerQ[d[[k]]]] x^d[[k]]), {k, Length[d]}], {x, 0, n}], x, n], {n, 0, 90}] (* or *)
    a[0]=1; a[1]=0; a[n_] := Length@IntegerPartitions[n, All, Join @@ (#[[1]]^Range[#[[2]]] & /@ FactorInteger[n])]; a /@ Range[0, 90] (* Giovanni Resta, Mar 25 2017 *)

Formula

a(n) = [x^n] Product_{p^k|n, p prime, k >= 1} 1/(1 - x^(p^k)).
a(n) = 1 if n is a prime.
a(n) = 2 if n is a semiprime.

A284465 Number of compositions (ordered partitions) of n into prime power divisors of n (not including 1).

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 2, 1, 6, 2, 2, 1, 36, 1, 2, 2, 56, 1, 90, 1, 201, 2, 2, 1, 4725, 2, 2, 20, 1085, 1, 15778, 1, 5272, 2, 2, 2, 476355, 1, 2, 2, 270084, 1, 302265, 1, 35324, 3910, 2, 1, 67279595, 2, 14047, 2, 219528, 1, 5863044, 2, 14362998, 2, 2, 1, 47466605656, 1, 2, 35662, 47350056, 2, 119762253, 1, 9479643
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 27 2017

Keywords

Examples

			a(8) = 6 because 8 has 4 divisors {1, 2, 4, 8} among which 3 are prime powers > 1 {2, 4, 8} therefore we have [8], [4, 4], [4, 2, 2], [2, 4, 2], [2, 2, 4] and [2, 2, 2, 2].
		

Crossrefs

Programs

  • Maple
    F:= proc(n) local f,G;
          G:= 1/(1 - add(add(x^(f[1]^j),j=1..f[2]),f = ifactors(n)[2]));
          coeff(series(G,x,n+1),x,n);
    end proc:
    map(F, [$0..100]); # Robert Israel, Mar 29 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[PrimePowerQ[d[[k]]]] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 0, 68}]
  • Python
    from sympy import divisors, primefactors
    from sympy.core.cache import cacheit
    @cacheit
    def a(n):
        l=[x for x in divisors(n) if len(primefactors(x))==1]
        @cacheit
        def b(m): return 1 if m==0 else sum(b(m - j) for j in l if j <= m)
        return b(n)
    print([a(n) for n in range(71)]) # Indranil Ghosh, Aug 01 2017

Formula

a(n) = [x^n] 1/(1 - Sum_{p^k|n, p prime, k>=1} x^(p^k)).
a(n) = 1 if n is a prime.
a(n) = 2 if n is a semiprime.

A168324 Number of distinct permutations of the list of prime factors of n (with multiplicity), where a(1)=0.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 2, 2, 1, 1, 3, 1, 3, 2, 2, 1, 4, 1, 2, 1, 3, 1, 6, 1, 1, 2, 2, 2, 6, 1, 2, 2, 4, 1, 6, 1, 3, 3, 2, 1, 5, 1, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 12, 1, 2, 3, 1, 2, 6, 1, 3, 2, 6, 1, 10, 1, 2, 3, 3, 2, 6, 1, 5, 1, 2, 1, 12, 2, 2, 2, 4, 1, 12, 2, 3, 2, 2, 2, 6, 1, 3, 3, 6, 1, 6, 1, 4, 6
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 22 2009, May 08 2010

Keywords

Comments

Apart from a(1) the same as A008480.

Examples

			a(18)=3 because 18=2*2*3=2*3*2=3*2*2;
a(24)=4 because 24=2*2*2*3=2*2*3*2=2*3*2*2=3*2*2*2;
a(26)=2 because 26=2*13=13*2;
a(30)=6 because 30=2*3*5=2*5*3=3*2*5=3*5*2=5*2*3=5*3*2.
		

Crossrefs

Cf. A066882, A008480 (same except for initial term).

Programs

  • Mathematica
    nn = 105;
    f[list_, i] := list[[i]];
    a =Table[Boole[PrimeQ[n]], {n, 1, nn}]; Map[Total,Transpose[NestList[Table[
    DirichletConvolve[f[#, n], f[a, n], n, m], {m, 1, nn}] &, a,nn]]] (* Geoffrey Critzer, Feb 16 2015 *)

Extensions

Entries checked by D. S. McNeil, Nov 26 2010

A284463 Number of compositions (ordered partitions) of n into prime divisors of n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 12, 1, 2, 2, 1, 1, 65, 1, 23, 2, 2, 1, 351, 1, 2, 1, 38, 1, 15778, 1, 1, 2, 2, 2, 10252, 1, 2, 2, 1601, 1, 302265, 1, 80, 750, 2, 1, 299426, 1, 13404, 2, 107, 1, 1618192, 2, 5031, 2, 2, 1, 707445067, 1, 2, 2398, 1, 2, 119762253, 1, 173, 2, 39614048, 1, 255418101, 1, 2, 154603
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 27 2017

Keywords

Examples

			a(6) = 2 because 6 has 4 divisors {1, 2, 3, 6} among which 2 are primes {2, 3} therefore we have [3, 3] and [2, 2, 2].
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local b, l;
          l, b:= numtheory[factorset](n),
          proc(m) option remember; `if`(m=0, 1,
             add(`if`(j>m, 0, b(m-j)), j=l))
          end; b(n)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 28 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[PrimeQ[d[[k]]]] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 0, 75}]
  • Python
    from sympy import divisors, isprime
    from sympy.core.cache import cacheit
    @cacheit
    def a(n):
        l=[x for x in divisors(n) if isprime(x)]
        @cacheit
        def b(m): return 1 if m==0 else sum(b(m - j) for j in l if j <= m)
        return b(n)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Aug 01 2017, after Maple code

Formula

a(n) = [x^n] 1/(1 - Sum_{p|n, p prime} x^p).
a(n) = 1 if n is a prime power > 1.
a(n) = 2 if n is a squarefree semiprime.

A286852 Number of partitions of n into unitary prime divisors of n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 1, 0, 2, 0, 1, 1, 21, 1, 0, 2, 2, 2, 0, 1, 2, 2, 1, 1, 28, 1, 1, 1, 2, 1, 1, 0, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 5, 1, 2, 1, 0, 2, 42, 1, 1, 2, 43, 1, 0, 1, 2, 1, 1, 2, 49, 1, 1, 0, 2, 1, 5, 2, 2, 2, 1, 1, 10, 2, 1, 2, 2, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 01 2017

Keywords

Examples

			a(6) = 2 because 6 has 4 divisors {1, 2, 3, 6} among which 2 are unitary prime divisors {2, 3} therefore we have [3, 3] and [2, 2, 2].
		

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[d = Divisors[n]; Coefficient[Series[Product[1/(1 - Boole[GCD[n/d[[k]], d[[k]]] == 1 && PrimeQ[d[[k]]]] x^d[[k]]), {k, Length[d]}], {x, 0, n}], x, n], {n, 1, 95}]]
  • PARI
    A055231(n) = {my(f=factor(n)); for (k=1, #f~, if (f[k, 2] > 1, f[k, 2] = 0); ); factorback(f); } \\ From A055231
    unitary_prime_factors(n) = { my(ufs = factor(A055231(n))); ufs[,1]~; };
    partitions_into(n,parts,from=1) = if(!n,1,my(k = #parts, s=0); for(i=from,k,if(parts[i]<=n, s += partitions_into(n-parts[i],parts,i))); (s));
    A286852(n) = if(n<2,1-n,partitions_into(n,vecsort(unitary_prime_factors(n), , 4))); \\ Antti Karttunen, Jul 02 2018

Formula

a(n) = [x^n] Product_{p|n, p prime, gcd(p, n/p) = 1} 1/(1 - x^p).
a(n) = 0 if n is a powerful number (A001694).

A107329 Triangle read by rows: T(n,k) gives number of partitions of k, (k=1..n) into the prime factors of n, for n>=1.

Original entry on oeis.org

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

Views

Author

Wouter Meeussen, May 22 2005

Keywords

Comments

T(n,n) equals A066882(n).

Examples

			T(30,12)=5 counting [2,2,2,2,2,2], [2,2,2,3,3], [3,3,3,3], [2,2,3,5] and [2,5,5].
Triangle begins:
  {0},
  {0, 1},
  {0, 0, 1},
  {0, 1, 0, 1},
  {0, 0, 0, 0, 1},
  {0, 1, 1, 1, 1, 2},
  {0, 0, 0, 0, 0, 0, 1},
  {0, 1, 0, 1, 0, 1, 0, 1},
  {0, 0, 1, 0, 0, 1, 0, 0, 1},
  ...
		

Crossrefs

Cf. A066882.
Row sums +1 give A092976.

Programs

  • Maple
    with(numtheory):
    T:= proc(n) local b, l; l:= sort([factorset(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))))
              end; forget(b):
          seq(b(k, nops(l)), k=1..n)
        end:
    seq(T(n), n=1..20);  # Alois P. Heinz, Oct 28 2021
  • Mathematica
    Table[Rest@CoefficientList[Series[1/Times @@ ((1-x^#)& /@ (First /@ FactorInteger[n])), {x, 0, n}], x], {n, 2, 24}]

Formula

T(n,k) is coefficient of x^k in 1/Product(1-x^p_i) with p_i the prime factors of n.

Extensions

T(1,1) = 0 prepended by Michel Marcus, Oct 28 2021

A284839 Number of compositions (ordered partitions) of n into prime power divisors of n (including 1).

Original entry on oeis.org

1, 1, 2, 2, 6, 2, 24, 2, 56, 20, 128, 2, 1490, 2, 741, 449, 5272, 2, 36901, 2, 81841, 3320, 29966, 2, 4135004, 572, 200389, 26426, 5452795, 2, 110187694, 2, 47350056, 226019, 9262156, 51885, 10783889706, 2, 63346597, 2044894, 14064551462, 2, 109570982403, 2, 35537376325, 470326038, 2972038874, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 03 2017

Keywords

Examples

			a(4) = 6 because 4 has 3 divisors {1, 2, 4} and all are prime powers therefore we have [4], [2, 2], [2, 1, 1], [1, 2, 1], [1, 1, 2] and [1, 1, 1, 1].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) local d, b; d, b:= select(x->
          nops(factorset(x))<2, divisors(n)),
          proc(n) option remember; `if`(n=0, 1,
            add(`if`(j>n, 0, b(n-j)), j=d))
          end: b(n)
        end:
    seq(a(n), n=0..60);  # Alois P. Heinz, Apr 15 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/(1 - x - Sum[Boole[PrimePowerQ[d[[k]]]] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 0, 47}]

Formula

a(n) = [x^n] 1/(1 - x - Sum_{p^k|n, p prime, k>=1} x^(p^k)).
a(n) = 2 if n is a prime.

A160810 Numbers k such that the number of partitions of k into prime divisors of k exceeds the number of distinct transpositions of prime factors of k.

Original entry on oeis.org

18, 24, 30, 36, 40, 42, 45, 48, 50, 54, 56, 60, 63, 66, 70, 72, 75, 78, 80, 84, 88, 90, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 117, 120, 126, 130, 132, 135, 136, 138, 140, 144, 147, 150, 152, 153, 154, 156, 160, 162, 165, 168, 170, 171, 174, 175, 176
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 23 2009

Keywords

Comments

Numbers k such that A066882(k) > A168324(k).

Crossrefs

Programs

  • Maple
    A066882 := proc(n) gf := 1 ; for d in numtheory[divisors](n) do if isprime(d) then gf := gf/(1-x^d) ; gf := taylor(gf,x=0,n+2) ; end if; end do: coeftayl(gf,x=0,n) ; end proc:
    A168324 := proc(n) if n = 1 then 0; else multn := numtheory[bigomega](n) ; multn := factorial(multn) ; for p in ifactors(n)[2] do multn := multn/factorial(op(2,p)) ; end do: multn ; end if; end proc:
    for n from 1 to 300 do if A066882(n) > A168324(n) then printf("%d,\n",n) ; end if; end do: # R. J. Mathar, May 21 2010

Extensions

More terms from R. J. Mathar, May 21 2010
Showing 1-10 of 11 results. Next