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

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.

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.

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

A300580 Number of partitions of n into prime power parts (not including 1) that do not divide n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 3, 1, 3, 2, 11, 1, 18, 6, 9, 5, 43, 5, 65, 7, 31, 30, 137, 5, 115, 59, 84, 26, 379, 19, 519, 42, 213, 197, 323, 23, 1267, 340, 489, 50, 2213, 107, 2897, 221, 375, 938, 4871, 61, 3733, 662, 2193, 553, 10218, 409, 4241, 310, 4341, 3685, 20586, 154, 25792, 5635, 2862, 990, 12806
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 09 2018

Keywords

Examples

			a(10) = 2 because we have [7, 3] and [4, 3, 3].
		

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[Product[1/(1 - Boole[Mod[n, k] != 0 && PrimePowerQ[k]] x^k), {k, 1, n}], {x, 0, n}], {n, 0, 65}]
Showing 1-4 of 4 results.