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 A249142 #31 Aug 03 2025 21:05:01 %S A249142 0,2,0,0,0,1,2,0,0,3,4,0,1,2,0,0,1,2,3,4,0,1,2,0,0,6,0,1,2,3,4,0,1,2, %T A249142 0,0,4,5,6,0,1,2,3,4,0,1,2,0,0,2,3,4,5,6,0,1,2,3,4,0,1,2,0,0,0,1,2,3, %U A249142 4,5,6,0,1,2,3,4,0,1,2,0,0,7,8,0,1,2,3,4,5,6,0,1,2,3,4,0,1,2,0,0 %N A249142 Let k be the difference between the smallest square >= n and n. Sequence gives difference between the smallest square >= k and k. %C A249142 Equals A068527 applied to itself. %H A249142 G. C. Greubel, <a href="/A249142/b249142.txt">Table of n, a(n) for n = 1..5000</a> %F A249142 a(n) = A068527(A068527(n)). %F A249142 a(n) = n - ceiling(sqrt(n))^2 + ceiling(sqrt(-n+ceiling(sqrt(n))^2))^2. %F A249142 a(n) < (64n)^(1/4). - _Charles R Greathouse IV_, Oct 22 2014 %e A249142 For n = 13 the next biggest square is 16, thus k = 16 - 13 = 3 and for 3 the next biggest square is 4, thus a(14) = 3 - 2 = 1. %p A249142 A068527:= n -> ceil(sqrt(n))^2 - n: %p A249142 map(A068527@@2, [$1..100]); # _Robert Israel_, Nov 02 2017 %t A249142 Table[n - Ceiling[Sqrt[n]]^2 + Ceiling[Sqrt[-n + Ceiling[Sqrt[n]]^2]]^2, {n, 1, 100}] %o A249142 (PARI) A068527(n)=if(issquare(n), 0, (sqrtint(n)+1)^2-n) %o A249142 a(n)=A068527(A068527(n)) \\ _Charles R Greathouse IV_, Oct 22 2014 %o A249142 (Magma) [n - Ceiling(Sqrt(n))^2 + Ceiling(Sqrt(-n+Ceiling(Sqrt(n))^2))^2: n in [1..100]]; // _Vincenzo Librandi_, Oct 23 2014 %Y A249142 Cf. A068527. %K A249142 nonn,easy %O A249142 1,2 %A A249142 _Valtteri Raiko_, Oct 22 2014 %E A249142 Edited, old crossrefs entry moved to Comments, and first two formula lines interchanged by _Wolfdieter Lang_, Nov 10 2014