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.

A018818 Number of partitions of n into divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 10, 5, 11, 2, 45, 2, 14, 14, 36, 2, 81, 2, 92, 18, 20, 2, 458, 7, 23, 23, 156, 2, 742, 2, 202, 26, 29, 26, 2234, 2, 32, 30, 1370, 2, 1654, 2, 337, 286, 38, 2, 9676, 9, 407, 38, 454, 2, 3132, 38, 3065, 42, 47, 2, 73155, 2, 50, 493, 1828, 44, 5257, 2, 740, 50, 5066
Offset: 1

Views

Author

Keywords

Comments

From Reinhard Zumkeller, Dec 11 2009: (Start)
For odd primes p: a(p^2) = p + 2; for n > 1: a(A001248(n)) = A052147(n);
For odd primes p > 3, a(3*p) = 2*p + 4; for n > 2: a(A001748(n)) = A100484(n) + 4. (End)
From Matthew Crawford, Jan 19 2021: (Start)
For a prime p, a(p^3) = (p^3 + p^2 + 2*p + 4)/2;
For distinct primes p and q, a(p*q) = (p+1)*(q+1)/2 + 2. (End)

Examples

			The a(6) = 8 representations of 6 are 6 = 3 + 3 = 3 + 2 + 1 = 3 + 1 + 1 + 1 = 2 + 2 + 2 = 2 + 2 + 1 + 1 = 2 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1.
		

Crossrefs

Programs

  • Haskell
    a018818 n = p (init $ a027750_row n) n + 1 where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m | m < k     = 0
                      | otherwise = p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Magma
    [#RestrictedPartitions(n,{d:d in Divisors(n)}): n in [1..100]]; // Marius A. Burtea, Jan 02 2019
  • Maple
    A018818 := proc(n)
        local a,p,w,el ;
        a := 0 ;
        for p in combinat[partition](n) do
            w := true ;
            for el in p do
                if modp(n,el) <> 0 then
                    w := false;
                    break;
                end if;
            end do:
            if w then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 30 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/Product[1 - x^d[[i]], {i, Length[d]}], {x, 0, n}], x, n], {n, 100}] (* T. D. Noe, Jul 28 2011 *)
  • PARI
    a(n)=numbpartUsing(n, divisors(n));
    numbpartUsing(n, v, mx=#v)=if(n<1, return(n==0)); sum(i=1,mx, numbpartUsing(n-v[i],v,i)) \\ inefficient; Charles R Greathouse IV, Jun 21 2017
    
  • PARI
    A018818(n) = { my(p = Ser(1, 'x, 1+n)); fordiv(n, d, p /= (1 - 'x^d)); polcoef(p, n); }; \\ Antti Karttunen, Jan 23 2025, after Vladeta Jovovic
    

Formula

Coefficient of x^n in the expansion of 1/Product_{d|n} (1-x^d). - Vladeta Jovovic, Sep 28 2002
a(n) = 2 iff n is prime. - Juhani Heino, Aug 27 2009
a(n) = f(n,n,1), where f(n,m,k) = f(n,m,k+1) + f(n,m-k,k)*0^(n mod k) if k <= m, otherwise 0^m. - Reinhard Zumkeller, Dec 11 2009
Paul Erdős, Andrew M. Odlyzko, and the Editors of the AMM give bounds; see Bowman et al. - Charles R Greathouse IV, Dec 04 2012

A072721 Number of partitions of n into parts which are each positive powers of a single number >1 (which may vary between partitions).

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 4, 1, 4, 2, 6, 1, 10, 1, 8, 4, 10, 1, 15, 1, 17, 5, 16, 1, 26, 2, 22, 5, 29, 1, 37, 1, 36, 7, 38, 4, 57, 1, 48, 9, 65, 1, 73, 1, 77, 13, 76, 1, 108, 2, 99, 11, 117, 1, 130, 5, 145, 14, 142, 1, 189, 1, 168, 19, 202, 5, 223, 1, 241, 17, 247, 1, 309, 1, 286, 24, 333, 4
Offset: 0

Views

Author

Henry Bottomley, Jul 05 2002

Keywords

Comments

First differs from A322968 at a(12) = 10, A322968(12) = 9.

Examples

			a(5)=1 since the only partition without 1 as a part is 5 (a power of 5). a(6)=4 since 6 can be written as 6 (powers of 6), 3+3 (powers of 3) and 4+2 and 2+2+2 (both powers of 2).
From _Gus Wiseman_, Jan 01 2019: (Start)
The a(2) = 1 through a(12) = 10 integer partitions (A = 10, B = 11, C = 12):
  (2)  (3)  (4)   (5)  (6)    (7)  (8)     (9)    (A)      (B)  (C)
            (22)       (33)        (44)    (333)  (55)          (66)
                       (42)        (422)          (82)          (84)
                       (222)       (2222)         (442)         (93)
                                                  (4222)        (444)
                                                  (22222)       (822)
                                                                (3333)
                                                                (4422)
                                                                (42222)
                                                                (222222)
(End)
Compare above to the example section of A379957. - _Antti Karttunen_, Jan 23 2025
		

Crossrefs

Programs

  • Mathematica
    radbase[n_]:=n^(1/GCD@@FactorInteger[n][[All,2]]);
    Table[Length[Select[IntegerPartitions[n],And[FreeQ[#,1],SameQ@@radbase/@#]&]],{n,30}] (* Gus Wiseman, Jan 01 2019 *)
  • PARI
    a(n)={if(n==0, 1, sumdiv(n, d, if(d>1&&!ispower(d), polcoef(1/prod(j=1, logint(n, d), 1 - x^(d^j), Ser(1, x, 1+n)), n))))} \\ Andrew Howroyd, Jan 23 2025
    
  • PARI
    seq(n)={Vec(1 + sum(d=2, n, if(!ispower(d), -1 + 1/prod(j=1, logint(n, d), 1 - x^(d^j), Ser(1, x, 1+n)))))} \\ Andrew Howroyd, Jan 23 2025

Formula

a(n) = A072721(n)-A072721(n-1). a(p)=1 for p prime.
a(n) = A322900(n) - 1. - Gus Wiseman, Jan 01 2019
G.f.: 1 + Sum_{k>=2} -1 + 1/Product_{j>=1} (1 - x^(A175082(k)^j)). - Andrew Howroyd, Jan 23 2025
For n >= 1, a(n) >= A379957(n). - Antti Karttunen, Jan 23 2025

A322968 Number of integer partitions of n with no ones whose parts are all powers of the same squarefree number.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 4, 1, 4, 2, 6, 1, 9, 1, 8, 4, 10, 1, 14, 1, 16, 5, 16, 1, 24, 2, 22, 5, 28, 1, 37, 1, 36, 7, 38, 4, 55, 1, 48, 9, 63, 1, 73, 1, 76, 12, 76, 1, 105, 2, 98, 11, 116, 1, 128, 5, 143, 14, 142, 1, 186, 1, 168, 18, 202, 5, 223, 1, 240, 17, 247, 1, 305, 1, 286, 23
Offset: 0

Views

Author

Gus Wiseman, Jan 01 2019

Keywords

Comments

First differs from A072721 at a(12) = 9, A072721(12) = 10.
First differs from A379957 at a(16) = 10, A379957(16) = 9.

Examples

			The a(2) = 1 through a(12) = 9 integer partitions (A = 10, B = 11):
  (2)  (3)  (4)   (5)  (6)    (7)  (8)     (9)    (A)      (B)  (66)
            (22)       (33)        (44)    (333)  (55)          (84)
                       (42)        (422)          (82)          (93)
                       (222)       (2222)         (442)         (444)
                                                  (4222)        (822)
                                                  (22222)       (3333)
                                                                (4422)
                                                                (42222)
                                                                (222222)
The a(20) = 16 integer partitions:
  (10,10), (16,4),
  (8,8,4), (16,2,2),
  (5,5,5,5), (8,4,4,4), (8,8,2,2),
  (4,4,4,4,4), (8,4,4,2,2),
  (4,4,4,4,2,2), (8,4,2,2,2,2),
  (4,4,4,2,2,2,2), (8,2,2,2,2,2,2),
  (4,4,2,2,2,2,2,2),
  (4,2,2,2,2,2,2,2,2),
  (2,2,2,2,2,2,2,2,2,2).
		

Crossrefs

Programs

  • Mathematica
    radbase[n_]:=n^(1/GCD@@FactorInteger[n][[All,2]]);
    powsqfQ[n_]:=SameQ@@Last/@FactorInteger[n];
    Table[Length[Select[IntegerPartitions[n],And[FreeQ[#,1],And@@powsqfQ/@#,SameQ@@radbase/@#]&]],{n,30}]
  • PARI
    a(n)={if(n==0, 1, sumdiv(n, d, if(d>1&&issquarefree(d), polcoef(1/prod(j=1, logint(n, d), 1 - x^(d^j), Ser(1, x, 1+n)), n))))} \\ Andrew Howroyd, Jan 23 2025
    
  • PARI
    seq(n)={Vec(1 + sum(d=2, n, if(issquarefree(d), -1 + 1/prod(j=1, logint(n, d), 1 - x^(d^j), Ser(1, x, 1+n)))))} \\ Andrew Howroyd, Jan 23 2025

Formula

From Andrew Howroyd, Jan 23 2025: (Start)
G.f.: 1 + Sum_{k>=2} -1 + 1/Product_{j>=1} (1 - x^(A005117(k)^j)).
a(p) = 1 for prime p. (End)

Extensions

a(66) onwards from Andrew Howroyd, Jan 23 2025
Showing 1-3 of 3 results.