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 83 results. Next

A378604 Lexicographically earliest infinite sequence such that a(i) = a(j) => A033630(i) = A033630(j) and A083206(i) = A083206(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 6, 1, 1, 1, 1, 1, 7, 1, 1, 1, 8, 1, 9, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 8, 1, 3, 1, 1, 1, 11, 1, 1, 1, 1, 1, 9, 1, 1, 1, 12, 1, 13, 1, 1, 1, 1, 1, 14, 1, 15, 1, 1, 1, 16, 1, 1, 1, 2, 1, 17, 1, 1, 1, 1, 1, 18, 1, 1, 1, 4, 1, 14, 1, 2, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 01 2024

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A033630(n), A083206(n)].

Crossrefs

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    v033630 = readvec("b033630_to.txt"); \\ Precomputed with A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));
    A033630(n) = v033630[n];
    v083206 = readvec("b083206_to.txt"); \\ Precomputed with A083206(n) = { my(p=1); fordiv(n, d, p *= ('x^d + 'x^-d)); (polcoeff(p, 0)/2); };
    A083206(n) = v083206[n];
    Aux378604(n) = [A033630(n), A083206(n)];
    v378604 = rgs_transform(vector(up_to, n, Aux378604(n)));
    A378604(n) = v378604[n];

A378603 Lexicographically earliest infinite sequence such that a(i) = a(j) => A046523(i) = A046523(j) and A033630(i) = A033630(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 6, 2, 7, 2, 6, 6, 8, 2, 7, 2, 9, 6, 6, 2, 10, 3, 6, 5, 9, 2, 11, 2, 12, 6, 6, 6, 13, 2, 6, 6, 14, 2, 15, 2, 16, 16, 6, 2, 17, 3, 16, 6, 16, 2, 14, 6, 18, 6, 6, 2, 19, 2, 6, 16, 20, 6, 15, 2, 16, 6, 21, 2, 22, 2, 6, 16, 16, 6, 23, 2, 24, 8, 6, 2, 25, 6, 6, 6, 26, 2, 27, 6, 16, 6, 6, 6, 28, 2, 16, 16, 29, 2, 23, 2, 26, 21
Offset: 1

Views

Author

Antti Karttunen, Dec 01 2024

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A046523(n), A033630(n)].

Crossrefs

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    v033630 = readvec("b033630_to.txt"); \\ Precomputed with A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));
    A033630(n) = v033630[n];
    Aux378603(n) = [A046523(n), A033630(n)];
    v378603 = rgs_transform(vector(up_to, n, Aux378603(n)));
    A378603(n) = v378603[n];

A378437 Dirichlet inverse of A033630, where A033630 is the number of partitions of n into distinct divisors of n.

Original entry on oeis.org

1, -1, -1, 0, -1, 0, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, -1, 1, 1, -1, -2, 0, 1, 0, -1, -1, -2, -1, 0, 1, 1, 1, -2, -1, 1, 1, -1, -1, -1, -1, 0, 0, 1, -1, -2, 0, 0, 1, 0, -1, 0, 1, 0, 1, 1, -1, -26, -1, 1, 0, 0, 1, -1, -1, 0, 1, -1, -1, -14, -1, 1, 0, 0, 1, 0, -1, -1, 0, 1, -1, -19, 1, 1, 1, -1, -1, -17, 1, 0, 1, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Nov 26 2024

Keywords

Crossrefs

Cf. A033630, A378438 (Möbius transform).

Programs

  • PARI
    A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));
    memoA378437 = Map();
    A378437(n) = if(1==n,1,my(v); if(mapisdefined(memoA378437,n,&v), v, v = -sumdiv(n,d,if(dA033630(n/d)*A378437(d),0)); mapput(memoA378437,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA033630(n/d) * a(d).

A378436 Inverse Möbius transform of A033630, where A033630 is the number of partitions of n into distinct divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 4, 3, 4, 2, 9, 2, 4, 4, 5, 2, 9, 2, 7, 4, 4, 2, 16, 3, 4, 4, 7, 2, 12, 2, 6, 4, 4, 4, 21, 2, 4, 4, 12, 2, 11, 2, 6, 6, 4, 2, 28, 3, 6, 4, 6, 2, 14, 4, 11, 4, 4, 2, 53, 2, 4, 6, 7, 4, 11, 2, 6, 4, 8, 2, 60, 2, 4, 6, 6, 4, 10, 2, 20, 5, 4, 2, 43, 4, 4, 4, 9, 2, 41, 4, 6, 4, 4, 4, 51, 2, 6, 6, 12
Offset: 1

Views

Author

Antti Karttunen, Nov 26 2024

Keywords

Comments

The odd bisection differs from A099774 (the odd bisection of A000005) apparently in the positions given by A005231 (odd abundant numbers): 945, 1575, 2205, 2835, 3465, ...

Crossrefs

Cf. A000005, A005231, A033630, A099774, A378438 (Dirichlet inverse).

Programs

  • PARI
    A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));
    A378436(n) = sumdiv(n,d,A033630(d));

Formula

a(n) = Sum_{d|n} A033630(d).

A378439 Möbius transform of A033630, where A033630 is the number of partitions of n into distinct divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 29, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 21, 0, 0, 0, 1, 0, 19, 0, 0, 0, 0, 0, 11, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 12
Offset: 1

Views

Author

Antti Karttunen, Nov 27 2024

Keywords

Crossrefs

Cf. A008683, A033630, A378440 (Dirichlet inverse).

Programs

  • PARI
    A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));
    A378439(n) = sumdiv(n, d, moebius(n/d)*A033630(d));

Formula

a(n) = Sum_{d|n} A008683(n/d)*A033630(d).

A378440 Dirichlet inverse of Möbius transform of A033630, where A033630 is the number of partitions of n into distinct divisors of n.

Original entry on oeis.org

1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, -3, 0, 0, 0, -1, 0, -2, 0, 0, 0, 0, 0, -3, 0, 0, 0, -2, 0, -1, 0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, -29, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -19, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, -21, 0, 0, 0, -1, 0, -19, 0, 0, 0, 0, 0, -11, 0, 0, 0, -1
Offset: 1

Views

Author

Antti Karttunen, Nov 27 2024

Keywords

Comments

Equally, inverse Möbius transform of A378437, which is the Dirichlet inverse of A033630.

Crossrefs

Inverse Möbius transform of A378437.
Dirichlet inverse of A378439.
Cf. A033630.

Programs

  • PARI
    A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));
    A378439(n) = sumdiv(n, d, moebius(n/d)*A033630(d));
    memoA378440 = Map();
    A378440(n) = if(1==n,1,my(v); if(mapisdefined(memoA378440,n,&v), v, v = -sumdiv(n,d,if(dA378439(n/d)*A378440(d),0)); mapput(memoA378440,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA378439(n/d) * a(d).
a(n) = Sum_{d|n} A378437(d).

A378605 Lexicographically earliest infinite sequence such that a(i) = a(j) => A001065(i) = A001065(j) and A033630(i) = A033630(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 12, 2, 13, 14, 15, 2, 16, 17, 18, 19, 20, 2, 21, 2, 22, 11, 23, 19, 24, 2, 25, 26, 27, 2, 28, 2, 29, 30, 31, 2, 32, 7, 33, 34, 35, 2, 36, 26, 37, 38, 39, 2, 40, 2, 41, 42, 43, 44, 45, 2, 46, 47, 48, 2, 49, 2, 29, 50, 51, 44, 52, 2, 53, 29, 54, 2, 55, 38, 35, 30, 56, 2, 57, 34, 58, 59, 60, 61, 62, 2, 63, 64, 65, 2, 66, 2, 67, 68
Offset: 1

Views

Author

Antti Karttunen, Dec 01 2024

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A001065(n), A033630(n)].

Crossrefs

Cf. also A378603.

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A001065(n) = (sigma(n)-n);
    v033630 = readvec("b033630_to.txt"); \\ Precomputed with A033630(n) = if(!n, 1, my(p=1); fordiv(n, d, p *= (1 + 'x^d)); polcoeff(p, n));
    A033630(n) = v033630[n];
    Aux378605(n) = [A001065(n), A033630(n)];
    v378605 = rgs_transform(vector(up_to, n, Aux378605(n)));
    A378605(n) = v378605[n];

A005100 Deficient numbers: numbers k such that sigma(k) < 2k.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 81, 82, 83, 85, 86
Offset: 1

Views

Author

Keywords

Comments

A number k is abundant if sigma(k) > 2k (cf. A005101), perfect if sigma(k) = 2k (cf. A000396), or deficient if sigma(k) < 2k (this sequence), where sigma(k) is the sum of the divisors of k (A000203).
Also, numbers k such that A033630(k) = 1. - Reinhard Zumkeller, Mar 02 2007
According to Deléglise (1998), the abundant numbers have natural density 0.2474 < A(2) < 0.2480. Since the perfect numbers have density 0, the deficient numbers have density 0.7520 < 1 - A(2) < 0.7526. Thus the n-th deficient number is asymptotic to 1.3287*n < n/(1 - A(2)) < 1.3298*n. - Daniel Forgues, Oct 10 2015
The data begins with 3 runs of 5 consecutive terms, from 1 to 5, 7 to 11 and 13 to 17. The maximal length of a run of consecutive terms is 5 because 6 is a perfect number and its proper multiples are abundant numbers. - Bernard Schott, May 19 2019
If p and q are primes such that phi(p*q) > p+1, then p*q^n is a term in the sequence for all n >= 1 where phi is the Euler totient function. - Amrit Awasthi, Sep 10 2024

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 128.

Crossrefs

Cf. A005101 (abundant), A125499 (even deficient), A247328 (odd deficient), A023196 (complement).
By definition, the weird numbers A006037 are not in this sequence.

Programs

  • Haskell
    a005100 n = a005100_list !! (n-1)
    a005100_list = filter (\x -> a001065 x < x) [1..]
    -- Reinhard Zumkeller, Oct 31 2015
    
  • Maple
    with(numtheory); s := proc(n) local i,j,ans; ans := [ ]; j := 0; for i while jA005100 := proc(n)
        numtheory[sigma](n) < 2*n ;
    end proc:
    A005100 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA005100(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 08 2015
  • Mathematica
    Select[Range[100], DivisorSigma[1, # ] < 2*# &] (* Stefan Steinerberger, Mar 31 2006 *)
  • PARI
    isA005100(n) = (sigma(n) < 2*n) \\ Michael B. Porter, Nov 08 2009
    
  • PARI
    for(n=1, 100, if(sigma(n) < 2*n, print1(n", "))) \\  Altug Alkan, Oct 15 2015
    
  • Python
    from sympy import divisors
    def ok(n): return sum(divisors(n)) < 2*n
    print(list(filter(ok, range(1, 87)))) # Michael S. Branicky, Aug 29 2021
    
  • Python
    from sympy import divisor_sigma
    from itertools import count, islice
    def A005100_gen(startvalue=1): return filter(lambda n:divisor_sigma(n) < 2*n,count(max(startvalue,1))) # generator of terms >= startvalue
    A005100_list = list(islice(A005100_gen(),20)) # Chai Wah Wu, Jan 14 2022

Formula

A001065(a(n)) < a(n). - Reinhard Zumkeller, Oct 31 2015

Extensions

More terms from Stefan Steinerberger, Mar 31 2006

A005153 Practical numbers: positive integers m such that every k <= sigma(m) is a sum of distinct divisors of m. Also called panarithmic numbers.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 66, 72, 78, 80, 84, 88, 90, 96, 100, 104, 108, 112, 120, 126, 128, 132, 140, 144, 150, 156, 160, 162, 168, 176, 180, 192, 196, 198, 200, 204, 208, 210, 216, 220, 224, 228, 234, 240, 252
Offset: 1

Views

Author

Keywords

Comments

Equivalently, positive integers m such that every number k <= m is a sum of distinct divisors of m.
2^r is a member for all r as every number < = sigma(2^r) = 2^(r+1)-1 is a sum of a distinct subset of divisors {1, 2, 2^2, ..., 2^m}. - Amarnath Murthy, Apr 23 2004
Also, numbers m such that A030057(m) > m. This is a consequence of the following theorem (due to Stewart), found at the McLeman link: An integer m >= 2 with factorization Product_{i=1..k} p_i^e_i with the p_i in ascending order is practical if and only if p_1 = 2 and, for 1 < i <= k, p_i <= sigma(Product_{j < i} p_j^e_j) + 1. - Franklin T. Adams-Watters, Nov 09 2006
Practical numbers first appear in Srinivasan's short paper, which contains terms up to 200. Let m be a practical number. He states that (1) if m>2, m is a multiple of 4 or 6; (2) sigma(m) >= 2*m-1 (A103288); and (3) 2^t*m is practical. He also states that highly composite numbers (A002182), perfect numbers (A000396), and primorial numbers (A002110) are practical. - T. D. Noe, Apr 02 2010
Conjecture: The sequence a(n)^(1/n) (n=3,4,...) is strictly decreasing to the limit 1. - Zhi-Wei Sun, Jan 12 2013
Conjecture: For any positive rational number r, there are finitely many pairwise distinct practical numbers q(1)..q(k) such that r = Sum_{j=1..k} 1/q(j). For example, 2 = 1/1 + 1/2 + 1/4 + 1/6 + 1/12 with 1, 2, 4, 6 and 12 all practical, and 10/11 = 1/2 + 1/4 + 1/8 + 1/48 + 1/132 + 1/176 with 2, 4, 8, 48, 132 and 176 all practical. - Zhi-Wei Sun, Sep 12 2015
Analogous with the {1 union primes} (A008578), practical numbers form a complete sequence. This is because it contains all powers of 2 as a subsequence. - Frank M Jackson, Jun 21 2016
Sun's 2015 conjecture on the existence of Egyptian fractions with practical denominators for any positive rational number is true. See the link "Egyptian fractions with practical denominators". - David Eppstein, Nov 20 2016
Conjecture: if all divisors of m are 1 = d_1 < d_2 < ... < d_k = m, then m is practical if and only if d_(i+1)/d_i <= 2 for 1 <= i <= k-1. - Jianing Song, Jul 18 2018
The above conjecture is incorrect. The smallest counterexample is 78 (for which one of these quotients is 13/6; see A174973). m is practical if and only if the divisors of m form a complete subsequence. See Wikipedia links. - Frank M Jackson, Jul 25 2018
Reply to the comment above: Yes, and now I can show the opposite: The largest value of d_(i+1)/d_i is not bounded for practical numbers. Note that sigma(n)/n is not bounded for primorials, and primorials are practical numbers. For any constant c >= 2, let k be a practical number such that sigma(k)/k > 2c. By Bertrand's postulate there exists some prime p such that c*k < p < 2c*k < sigma(k), so k*p is a practical number with consecutive divisors k and p where p/k > c. For example, for k = 78 we have 13/6 > 2, and for 97380 we have 541/180 > 3. - Jianing Song, Jan 05 2019
Erdős (1950) and Erdős and Loxton (1979) proved that the asymptotic density of practical numbers is 0. - Amiram Eldar, Feb 13 2021
Let P(x) denote the number of practical numbers up to x. P(x) has order of magnitude x/log(x) (see Saias 1997). Moreover, we have P(x) = c*x/log(x) + O(x/(log(x))^2), where c = 1.33607... (see Weingartner 2015, 2020 and Remark 1 of Pomerance & Weingartner 2021). As a result, a(n) = k*n*log(n*log(n)) + O(n), where k = 1/c = 0.74846... - Andreas Weingartner, Jun 26 2021
From Hal M. Switkay, Dec 22 2022: (Start)
Every number of least prime signature (A025487) is practical, thereby including two classes of number mentioned in Noe's comment. This follows from Stewart's characterization of practical numbers, mentioned in Adams-Watters's comment, combined with Bertrand's postulate (there is a prime between every natural number and its double, inclusive).
Also, the first condition in Stewart's characterization (p_1 = 2) is equivalent to the second condition with index i = 1, given that an empty product is equal to 1. (End)
Conjecture: every odd number, beginning with 3, is the sum of a prime number and a practical number. Note that this conjecture occupies the space between the unproven Goldbach conjecture and the theorem that every even number, beginning with 2, is the sum of two practical numbers (Melfi's 1996 proof of Margenstern's conjecture). - Hal M. Switkay, Jan 28 2023

References

  • H. Heller, Mathematical Buds, Vol. 1, Chap. 2, pp. 10-22, Mu Alpha Theta OK, 1978.
  • Malcolm R. Heyworth, More on Panarithmic Numbers, New Zealand Math. Mag., Vol. 17 (1980), pp. 28-34 [ ISSN 0549-0510 ].
  • Ross Honsberger, Mathematical Gems, M.A.A., 1973, p. 113.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • A. K. Srinivasan, Practical numbers, Current Science, 17 (1948), 179-180.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 146-147.

Crossrefs

Subsequence of A103288.
Cf. A002093, A007620 (second definition), A030057, A033630, A119348, A174533, A174973.
Cf. A027750.

Programs

  • Haskell
    a005153 n = a005153_list !! (n-1)
    a005153_list = filter (\x -> all (p $ a027750_row x) [1..x]) [1..]
       where p _  0 = True
             p [] _ = False
             p ds'@(d:ds) m = d <= m && (p ds (m - d) || p ds m)
    -- Reinhard Zumkeller, Feb 23 2014, Oct 27 2011
    
  • Maple
    isA005153 := proc(n)
        local ifs,pprod,p,i ;
        if n = 1 then
            return true;
        elif type(n,'odd') then
            return false ;
        end if;
        # not using ifactors here directly because no guarantee primes are sorted...
        ifs := ifactors(n)[2] ;
        pprod := 1;
        for p in sort(numtheory[factorset](n) ) do
            for i in ifs do
                if op(1,i) = p then
                    if p > 2 and p > 1+numtheory[sigma](pprod) then
                        return false ;
                    end if;
                    pprod := pprod*p^op(2,i) ;
                end if;
            end do:
        end do:
        return true ;
    end proc:
    for n from 1 to 300 do
        if isA005153(n)  then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jul 07 2023
  • Mathematica
    PracticalQ[n_] := Module[{f,p,e,prod=1,ok=True}, If[n<1 || (n>1 && OddQ[n]), False, If[n==1, True, f=FactorInteger[n]; {p,e} = Transpose[f]; Do[If[p[[i]] > 1+DivisorSigma[1,prod], ok=False; Break[]]; prod=prod*p[[i]]^e[[i]], {i,Length[p]}]; ok]]]; Select[Range[200], PracticalQ] (* T. D. Noe, Apr 02 2010 *)
  • PARI
    is_A005153(n)=bittest(n,0) && return(n==1); my(P=1); n && !for(i=2,#n=factor(n)~,n[1,i]>1+(P*=sigma(n[1,i-1]^n[2,i-1])) && return) \\ M. F. Hasler, Jan 13 2013
    
  • Python
    from sympy import factorint
    def is_A005153(n):
        if n & 1: return n == 1
        f = factorint(n) ; P = (2 << f.pop(2)) - 1
        for p in f: # factorint must have prime factors in increasing order
            if p > 1 + P: return
            P *= p**(f[p]+1)//(p-1)
        return True # M. F. Hasler, Jan 02 2023
    
  • Python
    from sympy import divisors;from more_itertools import powerset
    [i for i in range(1,253) if (lambda x:len(set(map(sum,powerset(x))))>sum(x))(divisors(i))] # Nicholas Stefan Georgescu, May 20 2023

Formula

Weingartner proves that a(n) ~ k*n log n, strengthening an earlier result of Saias. In particular, a(n) = k*n log n + O(n log log n). - Charles R Greathouse IV, May 10 2013
More precisely, a(n) = k*n*log(n*log(n)) + O(n), where k = 0.74846... (see comments). - Andreas Weingartner, Jun 26 2021

Extensions

More terms from Pab Ter (pabrlos(AT)yahoo.com), May 09 2004
Erroneous comment removed by T. D. Noe, Nov 14 2010
Definition changed to exclude n = 0 explicitly by M. F. Hasler, Jan 19 2013

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
Showing 1-10 of 83 results. Next