A379816 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.
0, 4, 12, 0, 25, 18, 448, 16, 12, 100, 1100, 18, 4225, 112, 240, 18, 289, 36, 549100, 25, 588, 2178, 13248, 72, 45, 676, 108, 126, 142129, 180, 71622400, 64, 396, 612, 1260, 48, 1369, 722, 507, 400, 42025, 294, 521345932, 242, 225, 559728, 108288, 72, 112, 100, 127500, 169, 1755625, 162, 2475, 448, 4332, 568516, 16573100, 150
Offset: 1
Keywords
Examples
a(16) = 18 because sqrt(1/16 - 1/17) = sqrt(1/272) is irrational but sqrt(1/16 - 1/18) = sqrt(1/144) = 1/12 is rational.
Links
- Felix Huber, Proof that a(1) = a(4) = 0
Programs
-
Maple
A379816:=proc(n) local k; if n=1 or n=4 then return 0 else for k from n+1 do if type(sqrt(1/n-1/k),rational) then return k fi od fi; end proc; seq(A379816(n),n=1..58);
-
PARI
a(n) = if ((n==1) || (n==4), return(0)); my(k=n+1); while (!issquare(1/n - 1/k), k++); k; \\ Michel Marcus, Feb 08 2025
Extensions
Terms a(59-60) from R. J. Mathar, Feb 12 2025
Comments