login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238380 Numbers k such that the average of the divisors of k and k+1 is the same. 8

%I #11 Jun 01 2022 19:03:05

%S 5,14,91,1334,1634,2685,3478,5452,9063,13915,16225,20118,20712,33998,

%T 42818,47795,64665,79338,84134,103410,106144,109214,111683,122073,

%U 123497,133767,166934,170884,203898,224561,228377,267630,289454,383594,384857,391348,440013

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

%C The average of the divisors of n is equal to sigma(n)/tau(n).

%C Up to 5*10^12, there are only 3 terms for which the mean is not an integer, namely 254641594575, 280895287491 and 328966666100.

%H Giovanni Resta, <a href="/A238380/b238380.txt">Table of n, a(n) for n = 1..6934</a> (terms < 5*10^12)

%e 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 av[n_] := DivisorSigma[1,n]/DivisorSigma[0,n]; Select[Range[10^5], av[#] == av[# + 1] &]

%t SequencePosition[Table[DivisorSigma[1,n]/DivisorSigma[0,n],{n,450000}],{x_,x_}][[All,1]] (* _Harvey P. Dale_, Jun 01 2022 *)

%o (Python)

%o from sympy import divisors

%o from fractions import Fraction

%o def aupto(limit):

%o alst, prev_divavg = [], 1

%o for n in range(2, limit+2):

%o divs = divisors(n)

%o divavg = Fraction(sum(divs), len(divs))

%o if divavg == prev_divavg: alst.append(n-1)

%o prev_divavg = divavg

%o return alst

%o print(aupto(440013)) # _Michael S. Branicky_, May 14 2021

%Y Cf. A002961.

%K nonn

%O 1,1

%A _Giovanni Resta_, Feb 25 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)