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.
%I A179877 #41 May 25 2025 09:23:56 %S A179877 1,10,22,46,58,82,106,166,178,226,262,265,346,358,382,454,466,469,478, %T A179877 493,502,505,517,562,586,589,718,781,838,862,886,889,901,910,934,982, %U A179877 985,1018,1165,1177,1186,1234,1282,1294,1306,1318,1333,1357,1366,1393 %N A179877 Numbers h such that h and h+1 have same contraharmonic mean of the numbers k < h such that gcd(k, h) = 1 and simultaneously this mean is an integer (see A179882). %C A179877 For corresponding values of numbers h+1 see A179878. Subsequence of A179875, A179871 and A179883. %H A179877 Amiram Eldar, <a href="/A179877/b179877.txt">Table of n, a(n) for n = 1..10000</a> %H A179877 Wikipedia, <a href="https://en.wikipedia.org/wiki/Contraharmonic_mean">Contraharmonic mean</a>. %F A179877 a(n) = (3*A179882(n) - 1)/2. - _Hilko Koning_, Aug 01 2018 %F A179877 a(n) = A179878(n) - 1. - _Amiram Eldar_, May 24 2025 %e A179877 From _Michael De Vlieger_, Jul 30 2018: (Start) %e A179877 10 is in the sequence since the reduced residue system of 10 is {1, 3, 7, 9} and that of 11 is {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, the mean of the squares of these 2 systems, divided by the mean of the systems themselves, is 7 in both cases. %e A179877 6 is not in the sequence, because though the RRS of 6, {1, 5}, and that of 7, {1, 2, 3, 4, 5, 6}, have the same contraharmonic mean of 13/3, it is not integral. (End) [corrected by _Hilko Koning_, Aug 20 2018] %t A179877 With[{s = Partition[Table[Mean[#^2]/Mean[#] &@ Select[Range[n - 1], GCD[#, n] == 1 &], {n, 1400}], 2, 1]}, Position[s, _?(And[IntegerQ@ First@ #, SameQ @@ #] &), 1, Heads -> False][[All, 1]]] %o A179877 (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));} %o A179877 isok(k) = {my(ah1 = ah(k), ah2 = ah(k+1)); ah1 == ah2 && denominator(ah1) == 1;} \\ _Amiram Eldar_, May 24 2025 %Y A179877 Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891. %K A179877 nonn %O A179877 1,2 %A A179877 _Jaroslav Krizek_, Jul 30 2010, Jul 31 2010 %E A179877 More terms from _Michael De Vlieger_, Jul 30 2018