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.

A053626 a(n) is the smallest positive integer k such that harmonic mean of n and k is an integer.

This page as a plain text file.
%I A053626 #28 Apr 08 2018 03:25:49
%S A053626 1,2,3,4,5,2,7,8,9,10,11,4,13,14,3,16,17,6,19,5,21,22,23,8,25,26,27,4,
%T A053626 29,6,31,32,33,34,14,12,37,38,39,10,41,7,43,44,5,46,47,16,49,50,51,52,
%U A053626 53,18,55,8,57,58,59,12,61,62,18,64,65,6,67,68,69,28,71,9,73,74,15,76
%N A053626 a(n) is the smallest positive integer k such that harmonic mean of n and k is an integer.
%C A053626 If a(n) <> n, then n is in A005279.
%C A053626 a(n) is the smallest positive integer k such that n + k divides n^2 + k^2. - _Altug Alkan_, Mar 29 2018
%H A053626 Altug Alkan, <a href="/A053626/b053626.txt">Table of n, a(n) for n = 1..10000</a>
%H A053626 Wikipedia, <a href="https://en.wikipedia.org/wiki/Harmonic_mean#Two_numbers">Harmonic mean -- Two numbers</a>
%e A053626 a(6) = 2 because harmonic mean of 6 and 2 is 3 which is an integer and harmonic mean of 6 and 1 is 12/7 which is not an integer.
%t A053626 Array[If[Count[Partition[Divisors[#], 2, 1], _?(#2 < 2 #1 & @@ # &)] == 0, #, Block[{k = 1}, While[! IntegerQ@ HarmonicMean@{k, #}, k++]; k]] &, 76] (* _Michael De Vlieger_, Apr 05 2018 *)
%o A053626 (PARI) a(n) = {my(k=1); while((2*n*k) % (n+k) != 0, k++); k; } \\ _Altug Alkan_, Mar 29 2018
%Y A053626 Cf. A005279.
%K A053626 nonn,easy
%O A053626 1,2
%A A053626 _Henry Bottomley_, Mar 20 2000
%E A053626 Name edited by _Altug Alkan_, Mar 29 2018