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.

A300704 Number of compositions (ordered 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, 2, 0, 7, 2, 7, 5, 46, 2, 115, 20, 39, 16, 723, 16, 1819, 27, 559, 414, 11481, 16, 13204, 1763, 6450, 383, 181548, 172, 455646, 1326, 70476, 29809, 571110, 275, 7203906, 121535, 739513, 1703, 45380391, 7362, 113898438, 65049, 757426, 2009203, 717490902, 2304
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 11 2018

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    a:= proc(m) option remember; local b; b:= proc(n) option
          remember; `if`(n=0, 1, add(`if`(nops(ifactors(j)[2])
           <>1 or irem(m, j)=0, 0, b(n-j)), j=2..n)) end; b(m)
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Mar 11 2018
  • Mathematica
    Table[SeriesCoefficient[1/(1 - Sum[Boole[Mod[n, k] != 0 && PrimePowerQ[k]] x^k, {k, 1, n}]), {x, 0, n}], {n, 0, 48}]

A286851 Number of compositions (ordered partitions) of n into unitary divisors of n.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 25, 2, 2, 2, 129, 2, 170, 2, 742, 450, 2, 2, 4603, 2, 1503, 3321, 29967, 2, 9278, 2, 200390, 2, 13460, 2, 154004511, 2, 2, 226020, 9262157, 51886, 127654, 2, 63346598, 2044895, 170354, 2, 185493291001, 2, 1304512, 567124, 2972038875, 2, 59489916, 2, 20367343494, 184947044, 14324735, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 01 2017

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local b, l; l, b:=
          select(x-> igcd(x, n/x)=1, numtheory[divisors](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..60);  # Alois P. Heinz, Aug 01 2017
  • Mathematica
    Join[{1}, Table[d = Divisors[n]; Coefficient[Series[1/(1 - Sum[Boole[GCD[n/d[[k]], d[[k]]] == 1] x^d[[k]], {k, Length[d]}]), {x, 0, n}], x, n], {n, 1, 53}]]
  • Python
    from sympy import divisors, gcd
    from sympy.core.cache import cacheit
    @cacheit
    def a(n):
        l=[x for x in divisors(n) if gcd(x, n//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(61)]) # Indranil Ghosh, Aug 01 2017, after Maple code

Formula

a(n) = [x^n] 1/(1 - Sum_{d|n, gcd(d, n/d) = 1} x^d).
a(n) = 2 if n is a prime power (A246655).

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.
Showing 1-3 of 3 results.