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.

A384354 Numbers k such that the arithmetic mean of the divisors of k evenly divides k+1.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 20, 23, 29, 31, 35, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 104, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 207, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
Offset: 1

Views

Author

Ivan N. Ianakiev, May 27 2025

Keywords

Comments

A term k with a fractional arithmetic mean of divisors is allowed as long as that arithmetic mean evenly divides k+1.
There exist triples such as (19,20,21) and quadruples such as (1,2,3,4) of consecutive numbers where the arithmetic mean of the divisors of every earlier number evenly divides the immediately following number. Are there similar quintuples?
Contains every prime p since (1+p)/2 evenly divides 1+p. - Michael S. Branicky, May 29 2025

Examples

			2 is a term since (1+2)/2 = 3/2 and 3/2 evenly divides 3.
19 is a term since (1+19)/2 is 10 and 10 evenly divides 20.
20 is a term since (1+2+4+5+10+20)/6 = 7 and 7 evenly divides 21.
		

Crossrefs

Cf. A000005, A000040 (subsequence), A000203.

Programs

  • Mathematica
    fQ[n_]:=Divisible[n+1,Mean[Divisors[n]]]; Select[Range[300],fQ]
  • PARI
    isok(k) = my(f=factor(k)); denominator((k+1)/(sigma(f)/numdiv(f))) == 1; \\ Michel Marcus, May 31 2025
  • Python
    from sympy import divisors
    def ok(n): return n and (n+1)*len(d:=divisors(n))%sum(d) == 0
    print([k for k in range(300) if ok(k)]) # Michael S. Branicky, May 29 2025