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.

A354591 Numbers k that can be written as the sum of 4 divisors of k (not necessarily distinct).

Original entry on oeis.org

4, 6, 8, 10, 12, 16, 18, 20, 24, 28, 30, 32, 36, 40, 42, 44, 48, 50, 52, 54, 56, 60, 64, 66, 68, 70, 72, 76, 78, 80, 84, 88, 90, 92, 96, 100, 102, 104, 108, 110, 112, 114, 116, 120, 124, 126, 128, 130, 132, 136, 138, 140, 144, 148, 150, 152, 156, 160, 162, 164, 168, 170, 172
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 18 2022

Keywords

Comments

All terms are even. - Robert Israel, Aug 31 2022
Is it true that a(n) = 2*A080671(n)? - Michel Marcus, Sep 01 2022 (True for n <= 10000. - N. J. A. Sloane, Sep 01 2022)
This is true. In other words, k is in the sequence if and only if k is even and divisible by 3, 4 or 5. Proof: the positive integer solutions of 1/a + 1/b + 1/c + 1/d = 1 can be enumerated explicitly, and each contains at least one even number and at least one divisible by 3, 4 or 5. Of course k = k/a + k/b + k/c + k/d if and only if 1 = 1/a + 1/b + 1/c + 1/d, and this writes k as the sum of 4 divisors of k if k is divisible by a,b,c, and d. If k is even and divisible by 3, we can use 1 = 1/3 + 1/3 + 1/6 + 1/6; if divisible by 4, 1 = 1/4 + 1/4 + 1/4 + 1/4; if even and divisible by 5, 1 = 1/2 + 1/5 + 1/5 + 1/10. - Robert Israel, Sep 01 2022
The asymptotic density of this sequence is 11/30. - Amiram Eldar, Aug 08 2023

Examples

			20 is in the sequence since 20 = 10+5+4+1 = 5+5+5+5 where each summand divides 20.
		

Crossrefs

Numbers k that can be written as the sum of j divisors of k (not necessarily distinct) for j=1..10: A000027 (j=1), A299174 (j=2), A355200 (j=3), this sequence (j=4), A355641 (j=5), A356609 (j=6), A356635 (j=7), A356657 (j=8), A356659 (j=9), A356660 (j=10).
Cf. A080671.

Programs

  • Maple
    F:= proc(x,S,j) option remember;
          local s,k;
          if j = 0  then return(x = 0) fi;
          if S = [] or x > j*S[-1] then return false fi;
          s:= S[-1];
          for k from 0 to min(j,floor(x/s)) do
            if procname(x-k*s, S[1..-2],j-k) then return true fi
          od;
          false
    end proc:
    select(t -> F(t, sort(convert(numtheory:-divisors(t),list)),4), [$1..200]); # Robert Israel, Aug 31 2022
  • Mathematica
    q[n_, k_] := AnyTrue[Tuples[Divisors[n], k], Total[#] == n &]; Select[Range[200], q[#, 4] &] (* Amiram Eldar, Aug 19 2022 *)
    CoefficientList[Series[2 (2 - x + 2*x^2 - x^3 + 2*x^4 + x^6 + 2*x^8 + x^10 + 2*x^12 + x^14 + 2*x^16 - x^17 + 2*x^18 - x^19 + 2*x^20)/((x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)*(1 + x + x^5 + x^6 + x^7 + x^8 + x^9 + x^2 + x^4 + x^3 + x^10)*(x - 1)^2), {x, 0, 50}], x] (* Wesley Ivan Hurt, Jul 17 2025 *)
  • PARI
    isok(k) = my(d=divisors(k)); forpart(p=k, if (setintersect(d, Set(p)) == Set(p), return(1)), , [4,4]); \\ Michel Marcus, Aug 19 2022

Formula

a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - 2*a(n-6) + 2*a(n-7) - 2*a(n-8) + 2*a(n-9) - 2*a(n-10) + 2*a(n-11) - 2*a(n-12) + 2*a(n-13) - 2*a(n-14) + 2*a(n-15) - 2*a(n-16) + 2*a(n-17) - 2*a(n-18) + 2*a(n-19) - 2*a(n-20) + 2*a(n-21) - a(n-22). - Wesley Ivan Hurt, Jun 29 2024
G.f.: 2*x*(2 - x + 2*x^2 - x^3 + 2*x^4 + x^6 + 2*x^8 + x^10 + 2*x^12 + x^14 + 2*x^16 - x^17 + 2*x^18 - x^19 + 2*x^20)/((x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)*(1 + x + x^5 + x^6 + x^7 + x^8 + x^9 + x^2 + x^4 + x^3 + x^10)*(x - 1)^2). - Wesley Ivan Hurt, Jul 17 2025