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.

A237287 Numbers that are not practical: positive integers n such that there exists at least one number k <= sigma(n) that is not a sum of distinct divisors of n.

Original entry on oeis.org

3, 5, 7, 9, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 79, 81, 82, 83, 85, 86, 87, 89, 91, 92, 93, 94, 95, 97, 98, 99, 101, 102, 103, 105
Offset: 1

Views

Author

Jaroslav Krizek, Mar 02 2014

Keywords

Comments

Complement of A005153 (practical numbers).
Numbers n such that A030057(n) < n.
First differs from A237046 at a(48).
First differs from A238524 at a(55). - Omar E. Pol, Mar 09 2014
First differs from A378471 at a(72). - Hartmut F. W. Hoft, Nov 27 2024

Examples

			5 is in the sequence because there are 3 numbers <= sigma(5) = 6 that are not a sum of any subset of distinct divisors of 5: 2, 3 and 4.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import factorint
    def A237287_gen(startvalue=1): # generator of terms
        for m in count(max(startvalue,1)):
            if m > 1:
                l = (~m & m-1).bit_length()
                if l>0:
                    P = (1<>l).items():
                        if p > 1+P:
                            yield m
                            break
                        P *= (p**(e+1)-1)//(p-1)
                else:
                    yield m
    A237387_list = list(islice(A237287_gen(),30)) # Chai Wah Wu, Jul 05 2023

Extensions

More terms added by Hartmut F. W. Hoft, Nov 27 2024, in order to show the difference from A378471.

A237290 Sum of positive numbers k <= sigma(n) that are a sum of any subset of distinct divisors of n.

Original entry on oeis.org

1, 6, 8, 28, 12, 78, 16, 120, 52, 144, 24, 406, 28, 192, 192, 496, 36, 780, 40, 903, 256, 288, 48, 1830, 124, 336, 320, 1596, 60, 2628, 64, 2016, 384, 432, 384, 4186, 76, 480, 448, 4095, 84, 4656, 88, 2688, 2184, 576, 96, 7750, 228, 2976, 576, 3136, 108, 7260
Offset: 1

Views

Author

Jaroslav Krizek, Mar 02 2014

Keywords

Examples

			For n = 5, a(5) = 1 + 5 + 6 = 12 (each of the numbers 1, 5 and 6 is the sum of a subset of distinct divisors of 5).
The numbers n = 14 and 15 is an interesting pair of consecutive numbers with identical value of sigma(n) such that simultaneously a(14) = a(15) and A237289(14) = A237289(15).
a(14) = 1+2+3+7+8+9+10+14+15+16+17+21+22+23+24 = a(15) = 1+3+4+5+6+8+9+15+16+18+19+20+21+23+24 = 192.
		

Crossrefs

Cf. A000203, A119348, A005153, A119347 (count of the same numbers), A184387, A229335, A237287, A237289.

Programs

  • Maple
    isSumDist := proc(n,k)
        local dvs,s ;
        dvs := numtheory[divisors](n) ;
        for s in combinat[powerset](dvs) do
            add(m,m=op(s)) ;
            if % = k then
                return true;
            end if;
        end do:
        false ;
    end proc:
    A237290 := proc(n)
        local a;
        a := 0 ;
        for k from 1 to numtheory[sigma](n) do
            if isSumDist(n,k) then
                a := a+k;
            end if;
        end do:
    end proc:
    seq(A237290(n),n=1..20) ; # R. J. Mathar, Mar 13 2014
  • Mathematica
    a[n_] := Plus @@ Union[Plus @@@ Subsets@ Divisors@ n]; Array[a, 54] (* Giovanni Resta, Mar 13 2014 *)
  • PARI
    padbin(n, len) = {b = binary(n); while(length(b) < len, b = concat(0, b);); b;}
    a(n) = {vks = []; d = divisors(n); nbd = #d; for (i=1, 2^nbd-1, b = padbin(i, nbd); onek = sum(j=1, nbd, d[j]*b[j]); vks = Set(concat(vks, onek));); sum(i=1, #vks, vks[i]);} \\ Michel Marcus, Mar 09 2014
    
  • PARI
    A237290(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); vecsum(c); }; \\ after Chai Wah Wu's Python-code, Antti Karttunen, Nov 29 2024
    
  • Python
    from sympy import divisors
    def A237290(n):
        ds = divisors(n)
        c, s = {0}, sum(ds)
        for d in ds:
            c |=  {a+d for a in c}
        return sum(a for a in c if 1<=a<=s) # Chai Wah Wu, Jul 05 2023

Formula

a(n) = A184387(n) - A237289(n).
a(p) = 2(p+2) for odd primes p.
a(n) = A184387(n) for practical numbers n (A005153), a(n) < A184387(n) for numbers n that are not practical (A237287).
a(n) = A000203(n) * (A119347(n)+1) / 2. [Found by Sequence Machine and easily seen to be true. Compare for example to the formulas of A229335.] - Antti Karttunen, Nov 29 2024

A378450 a(n) is the number of positive numbers k <= sigma(n) that are not a sum of any subset of distinct divisors of n.

Original entry on oeis.org

0, 0, 1, 0, 3, 0, 5, 0, 6, 3, 9, 0, 11, 9, 9, 0, 15, 0, 17, 0, 17, 21, 21, 0, 24, 27, 25, 0, 27, 0, 29, 0, 33, 39, 33, 0, 35, 45, 41, 0, 39, 0, 41, 21, 23, 57, 45, 0, 50, 30, 57, 35, 51, 0, 57, 0, 65, 75, 57, 0, 59, 81, 45, 0, 69, 0, 65, 63, 81, 2, 69, 0, 71, 99, 61, 77, 81, 0, 77, 0, 90, 111, 81, 0, 93, 117, 105
Offset: 1

Views

Author

Antti Karttunen, Nov 29 2024

Keywords

Comments

Difference between the sum of divisors n and the number of distinct sums of distinct divisors of n.

Examples

			For n = 3, with divisors [1, 3] and sigma(3)=4, only 2 in range 1..4 cannot be represented as a sum of a subset of [1, 3], therefore a(3) = 1.
For n = 15, with divisors [1, 3, 5, 15] and sigma(15) = 24, the subset sums are 1, 3, 1+3, 5, 1+5, 3+5, 1+3+5, 15, 1+15, 3+15, 1+3+15, 5+15, 1+5+15, 3+5+15, 1+3+5+15 i.e., [1, 3, 4, 5, 6, 8, 9, 15, 16, 18, 19, 20, 21, 23, 24], which leaves 2, 7, 10, 11, 12, 13, 14, 17, 22 as unrepresented numbers, therefore a(15) = 9.
		

Crossrefs

Cf. A000203, A119347, A237289 (gives the sums of unrepresented numbers), A322860.
Cf. A005153 (positions of 0's), A237287 (of nonzeros), A030057.

Programs

  • PARI
    A119347(n) = { my(c=[0]); fordiv(n,d, c = Set(concat(c,vector(#c,i,c[i]+d)))); (#c)-1; };
    A378450(n) = (sigma(n)-A119347(n));

Formula

a(n) = A000203(n) - A119347(n).
Showing 1-3 of 3 results.