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 A162400 #19 Feb 17 2018 12:27:01 %S A162400 1,1,1,4,1,1,1,4,9,1,1,4,1,1,1,16,4,9,9,4,1,1,1,4,25,1,1,4,1,1,1,16, %T A162400 16,4,4,36,9,9,9,4,9,1,1,4,1,1,1,16,49,25,25,4,1,1,1,4,25,1,1,4,1,1,1, %U A162400 64,16,16,16,4,4,4,4,36,36,9,9,9,9,9,9,16,81,9,9,4,1,1,1,4,25,1,1,4,1,1,1,16,16,49,49,100,25 %N A162400 a(n) = the largest square that when represented in binary is a substring within the binary representation of n. %C A162400 a(n) = A162401(n)^2. %H A162400 Michael De Vlieger, <a href="/A162400/b162400.txt">Table of n, a(n) for n = 1..4096</a> %F A162400 From _David A. Corneth_, Nov 04 2017: (Start) %F A162400 a(n^2) = n^2 %F A162400 a(4*n) = 4*a(n) %F A162400 a(4*n + 2) = a(2*n + 1). (End) %e A162400 a(8) = 4 since 8 = binary "1000" and the largest square less than or equal to 8, that of 4 = binary "100" appears as the first three bits of "1000". - _Michael De Vlieger_, Nov 04 2017 %t A162400 Table[Block[{k = n, s}, While[SequenceCount[#, IntegerDigits[Set[s, k^2], 2]] == 0, k--]; s] &@ IntegerDigits[n, 2], {n, 101}] (* _Michael De Vlieger_, Nov 04 2017 *) %Y A162400 Cf. A162401. %K A162400 base,nonn %O A162400 1,4 %A A162400 _Leroy Quet_, Jul 02 2009 %E A162400 Corrected and extended by _Sean A. Irvine_, Dec 05 2010