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 A379815 #16 Feb 12 2025 16:54:27 %S A379815 0,16,9,0,20,12,441,64,16,90,1089,36,4212,98,225,0,272,144,549081,25, %T A379815 567,2156,13225,48,144,650,81,98,142100,150,71622369,256,363,578,1225, %U A379815 64,1332,684,468,360,41984,252,521345889,198,180,559682,108241,144,63,400,127449,117,1755572,108,2420,392,4275,568458 %N A379815 a(n) is the smallest integer k > n such that sqrt(1/n + 1/k) is a rational number; or 0 if no such k exists. %C A379815 a(1) = a(4) = a(16) = 0. Proof: See Huber link. %C A379815 k > n exists for n > 16. %H A379815 Felix Huber, <a href="/A379815/a379815.txt">Proof that a(1) = a(4) = a(16) = 0</a> %F A379815 a(n) <= n*A002350(n)^2 - n if n is not a square; a(m^2) <= A076600(m)^2. - _Jinyuan Wang_, Feb 11 2025 %e A379815 a(3) = 9 because sqrt(1/3 + 1/4) = sqrt(7/12) is irrational, sqrt(1/3 + 1/5) = sqrt(8/15) is irrational, sqrt(1/3 + 1/6) = sqrt(1/2) is irrational, sqrt(1/3 + 1/7) = sqrt(10/21) is irrational, sqrt(1/3 + 1/8) = sqrt(11/24) is irrational, but sqrt(1/3 + 1/9) = sqrt(4/9) = 2/3 is rational. %p A379815 A379815:=proc(n) %p A379815 local k; %p A379815 if n=1 or n=4 or n=16 then %p A379815 return 0 %p A379815 else %p A379815 for k from n+1 do %p A379815 if type(sqrt(1/n+1/k),rational) then %p A379815 return k %p A379815 fi %p A379815 od %p A379815 fi; %p A379815 end proc; %p A379815 seq(A379815(n),n=1..58); %o A379815 (PARI) a(n) = if ((n==1) || (n==4) || (n==16), return(0)); my(k=n+1); while (!issquare(1/n + 1/k), k++); k; \\ _Michel Marcus_, Feb 08 2025 %Y A379815 Cf. A002350, A024352, A076600, A378501, A379816. %Y A379815 Cf. A357372, A257522. %K A379815 nonn %O A379815 1,2 %A A379815 _Felix Huber_, Feb 07 2025