A179878 Numbers h such that h and h-1 have same antiharmonic mean of the numbers k < h such that gcd(k, h) = 1 and simultaneously this mean is an integer (see A179882).
2, 11, 23, 47, 59, 83, 107, 167, 179, 227, 263, 266, 347, 359, 383, 455, 467, 470, 479, 494, 503, 506, 518, 563, 587, 590, 719, 782, 839, 863, 887, 890, 902, 911, 935, 983, 986, 1019, 1166, 1178, 1187, 1235, 1283, 1295, 1307, 1319, 1334, 1358, 1367, 1394
Offset: 1
Keywords
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
With[{s = Partition[Table[Mean[#^2]/Mean[#] &@ Select[Range[n - 1], GCD[#, n] == 1 &], {n, 1400}], 2, 1]}, 1 + Position[s, ?(And[IntegerQ@ First@ #, SameQ @@ #] &), 1, Heads -> False][[All, 1]]] (* _Michael De Vlieger, Jul 30 2018 *)
-
PARI
ah(n) = {my(f = factor(n)); if(n == 1, 1, 2*n/3 + (1/3) * prod(i = 1, #f~, 1 - f[i, 1])/eulerphi(f));} isok(k) = {if(k == 1, 0, my(ah1 = ah(k), ah2 = ah(k-1)); ah1 == ah2 && denominator(ah1) == 1);} \\ Amiram Eldar, May 24 2025
Formula
a(n) = A179877(n) + 1. - Amiram Eldar, May 24 2025
Comments