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 A277425 #42 Sep 08 2022 08:46:17 %S A277425 0,2,3,4,4,5,6,7,8,6,7,8,9,10,11,12,8,9,10,11,12,13,14,15,16,10,11,12, %T A277425 13,14,15,16,17,18,19,20,12,13,14,15,16,17,18,19,20,21,22,23,24,14,15, %U A277425 16,17,18,19,20,21,22,23,24,25,26,27,28,16,17,18,19,20,21,22,23,24,25,26,27,28 %N A277425 a(n) = sqrt(16*t^2 - 32*t + k^2 + 8*k - 8*k*t + 16), where t = ceiling(sqrt(n)) and k = t^2 - n. %C A277425 The equation 16*t^2 - 32*t + k^2 + 8*k - 8*k*t + 16 always produces a square, for any number n, with any t and k (i.e., t can be incremented and a corresponding k value is produced). %H A277425 Michael De Vlieger, <a href="/A277425/b277425.txt">Table of n, a(n) for n = 1..10000</a> %F A277425 a(n) ~ 2*sqrt(n). - _Charles R Greathouse IV_, Oct 14 2016 %F A277425 a(n) = n - (floor(sqrt(n-1))-1)^2. - _Charles R Greathouse IV_, Oct 14 2016 %F A277425 a(n) = n - ceiling(sqrt(n) - 2)^2. - _Vincenzo Librandi_, Nov 06 2016 %e A277425 n = 3, f(n) = 3; n = 11, f(n) = 7; n = 64, f(n) = 28; n = 103, f(n) = 22; n=208, f(n)= 39. %p A277425 seq(n-ceil(sqrt(n)-2)^2, n = 1 .. 64); # _Ridouane Oudra_, Jun 11 2019 %t A277425 Table[Function[t, Function[k, Sqrt[16 t^2 - 32 t + k^2 + 8 k - 8 k t + 16]][t^2 - n]]@ Ceiling@ Sqrt@ n, {n, 64}] (* or *) %t A277425 Table[n - Ceiling[Sqrt[n] - 2]^2, {n, 64}] (* _Michael De Vlieger_, Nov 06 2016 *) %o A277425 (PARI) a(n) = n - (sqrtint(n-1)-1)^2 \\ _Charles R Greathouse IV_, Oct 14 2016 %o A277425 (Magma) [n-Ceiling(Sqrt(n)-2)^2: n in [1..80]]; // _Vincenzo Librandi_, Nov 06 2016 %K A277425 nonn,easy %O A277425 1,2 %A A277425 _Joseph Foley_, Oct 14 2016