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 A030476 #28 Aug 11 2024 11:51:58 %S A030476 0,1,4,9,16,25,36,49,64,81,100,144,196,225,289,324,400,441,484,576, %T A030476 625,784,841,900,1024,1156,1444,1600,1764,1936,2025,2209,2401,2601, %U A030476 2809,3136,3364,3600,3844,4225,4489,4624,5184,5776,6084,6241,6400 %N A030476 Squares with property that all even digits occur together and all odd digits occur together. %C A030476 Among first 22083 terms (up to 10^14), there are 19202 even and 2881 odd terms. Also note that in odd terms, the only odd digit is the last one. - _Zak Seidov_, Apr 17 2016 %C A030476 From _Robert Israel_, Apr 18 2016: (Start) %C A030476 For any k>=1, (10^k-2)^2 is a member of the sequence with the first k-1 digits odd and the last k+1 even, while (2*10^k+2)^2 = 4*10^(2*k)+8*10^k+4 is a member with all digits even, and (2*10^k+1)^2 is an odd member. %C A030476 If x is an even member, then so is 100*x. (End) %H A030476 Zak Seidov, <a href="/A030476/b030476.txt">Table of n, a(n) for n = 1..22083</a> %F A030476 a(n) = A030477(n)^2. - _Andrew Howroyd_, Aug 11 2024 %e A030476 a(21055) = 9427771^2 = 88882866028441, - _Zak Seidov_, Apr 18 2016 %e A030476 a(21056) = 9427980^2 = 88886806880400. - _Robert Israel_, Apr 18 2016 %p A030476 filter:= proc(n) local L,evens,odds; %p A030476 L:= convert(n,base,10) mod 2; %p A030476 evens:= select(t -> L[t]::even, [$1..nops(L)]); %p A030476 odds:= select(t -> L[t]::odd, [$1..nops(L)]); %p A030476 (evens = []) or (odds = []) or (evens[1]>odds[-1]) or (odds[1]>evens[-1]) %p A030476 end proc: %p A030476 select(filter, [seq(i^2,i=0..100)]); # _Robert Israel_, Apr 18 2016 %t A030476 Select[Range[0, 80]^2, Function[k, Or[Flatten@ # == k, Flatten@ Reverse@ # == k] &@ GatherBy[k, EvenQ]]@ IntegerDigits@ # &] (* _Michael De Vlieger_, Apr 17 2016 *) %Y A030476 Setwise difference A000290 \ A030474. %Y A030476 Cf. A030477. %K A030476 nonn,base %O A030476 1,3 %A A030476 _Patrick De Geest_ %E A030476 Offset corrected by _Andrew Howroyd_, Aug 11 2024