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 A249298 #31 Nov 21 2014 17:57:31 %S A249298 1,2,1,1,1,2,3,1,1,4,5,1,5,6,1,1,9,2,9,2,1,12,13,1,1,14,1,3,17,2,19,1, %T A249298 3,20,1,1,23,24,3,1,25,2,27,6,1,30,31,1,1,2,3,7,35,4,1,2,3,40,41,1,41, %U A249298 42,1,1,1,4,47,10,5,2,51,1,51,52,3,12,1,6,57,1,1,60,61,1,3,62,7,3,65,2 %N A249298 Smallest positive integer k, such that s-k*n is a square where s is the smallest square >= k*n. %C A249298 For any n>=3, there exists at least one positive integer k, 1 <= k <= n-1 such that the difference between the smallest square >= k*n and k*n is a square. To prove this, consider the multiplier k = n-2. Then (n-2)*n = (n-1)^2-1, thus the difference from the next square is 1, which is a square. If n = 1, k = 1 and if n = 2, k = 2. %C A249298 Smallest positive integer k such that ceiling(sqrt(k*n))^2-k*n is a square. %e A249298 a(10) = 4, for ceiling(sqrt(10))^2-10 = 6, ceiling(sqrt(2*10))^2-2*10 = 5, ceiling(sqrt(3*10))^2-3*10 = 6 and ceiling(sqrt(4*10))^2-4*10 = 9 = 3^2. %t A249298 dif[n_] := Ceiling[Sqrt[n]]^2 - n;a[k_] := Module[{n = 1}, While[dif[dif[n*k]] != 0, n++]; Return[n]];Table[a[k], {k, 1, 90}] %o A249298 (PARI) a(n) = {k=1; while(!issquare(ceil(sqrt(k*n))^2-k*n), k++); k;} \\ _Michel Marcus_, Oct 24 2014 %Y A249298 Cf. A000290, A145236 (equals a(A000040)), A068527 (difference for k=1). %Y A249298 Cf. A145016, A145022, A145023, A145047, A145048, A145049, A145050, A145215. %K A249298 nonn %O A249298 1,2 %A A249298 _Valtteri Raiko_, Oct 24 2014