A020487 Antiharmonic numbers: numbers k such that sigma_1(k) divides sigma_2(k).
1, 4, 9, 16, 20, 25, 36, 49, 50, 64, 81, 100, 117, 121, 144, 169, 180, 196, 200, 225, 242, 256, 289, 324, 325, 361, 400, 441, 450, 468, 484, 500, 529, 576, 578, 605, 625, 650, 676, 729, 784, 800, 841, 900, 961, 968, 980, 1024, 1025, 1058, 1089, 1156, 1225, 1280, 1296
Offset: 1
Keywords
Examples
a(3) = 9 = 3^2; antiharmonic mean of divisors of 9 is (3^(2+1) + 1)/(3 + 1) = 7; 7 is an integer. - _Jaroslav Krizek_, Mar 09 2009
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000 (term 1..1000 from Paolo P. Lava)
- Marco Abrate, Stefano Barbero, Umberto Cerruti, and Nadir Murru, The Biharmonic mean, Mathematical Reports, Vol. 18(68), No. 4 (2016), pp. 483-495, preprint, arXiv:1601.03081 [math.NT], 2016.
Programs
-
Haskell
a020487 n = a020487_list !! (n-1) a020487_list = filter (\x -> a001157 x `mod` a000203 x == 0) [1..] -- Reinhard Zumkeller, Jan 21 2014
-
Magma
[n: n in [1..1300] | IsZero(DivisorSigma(2,n) mod DivisorSigma(1,n))]; // Bruno Berselli, Apr 10 2013
-
Mathematica
Select[Range[2000], Divisible[DivisorSigma[2, #], DivisorSigma[1, #]]&] (* Jean-François Alcover, Nov 14 2017 *)
-
PARI
is(n)=sigma(n,2)%sigma(n)==0 \\ Charles R Greathouse IV, Jul 02 2013
-
Python
from sympy import divisor_sigma def ok(n): return divisor_sigma(n, 2)%divisor_sigma(n, 1) == 0 print([k for k in range(1, 1300) if ok(k)]) # Michael S. Branicky, Feb 25 2024
-
Python
# faster for producing initial segment of sequence from math import prod from sympy import factorint def ok(n): f = factorint(n) sigma1 = prod((p**( e+1)-1)//(p-1) for p, e in f.items()) sigma2 = prod((p**(2*e+2)-1)//(p**2-1) for p, e in f.items()) return sigma2%sigma1 == 0 print([k for k in range(1, 1300) if ok(k)]) # Michael S. Branicky, Feb 25 2024
Comments