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.

A238380 Numbers k such that the average of the divisors of k and k+1 is the same.

This page as a plain text file.
%I A238380 #11 Jun 01 2022 19:03:05
%S A238380 5,14,91,1334,1634,2685,3478,5452,9063,13915,16225,20118,20712,33998,
%T A238380 42818,47795,64665,79338,84134,103410,106144,109214,111683,122073,
%U A238380 123497,133767,166934,170884,203898,224561,228377,267630,289454,383594,384857,391348,440013
%N A238380 Numbers k such that the average of the divisors of k and k+1 is the same.
%C A238380 The average of the divisors of n is equal to sigma(n)/tau(n).
%C A238380 Up to 5*10^12, there are only 3 terms for which the mean is not an integer, namely 254641594575, 280895287491 and 328966666100.
%H A238380 Giovanni Resta, <a href="/A238380/b238380.txt">Table of n, a(n) for n = 1..6934</a> (terms < 5*10^12)
%e A238380 91 is a term since the average of the divisors of 91 and 92 is the same. Indeed, (1+7+13+91)/4 = (1+2+4+23+46+92)/6.
%t A238380 av[n_] := DivisorSigma[1,n]/DivisorSigma[0,n]; Select[Range[10^5], av[#] == av[# + 1] &]
%t A238380 SequencePosition[Table[DivisorSigma[1,n]/DivisorSigma[0,n],{n,450000}],{x_,x_}][[All,1]] (* _Harvey P. Dale_, Jun 01 2022 *)
%o A238380 (Python)
%o A238380 from sympy import divisors
%o A238380 from fractions import Fraction
%o A238380 def aupto(limit):
%o A238380   alst, prev_divavg = [], 1
%o A238380   for n in range(2, limit+2):
%o A238380     divs = divisors(n)
%o A238380     divavg = Fraction(sum(divs), len(divs))
%o A238380     if divavg == prev_divavg: alst.append(n-1)
%o A238380     prev_divavg = divavg
%o A238380   return alst
%o A238380 print(aupto(440013)) # _Michael S. Branicky_, May 14 2021
%Y A238380 Cf. A002961.
%K A238380 nonn
%O A238380 1,1
%A A238380 _Giovanni Resta_, Feb 25 2014