A030476 Squares with property that all even digits occur together and all odd digits occur together.
0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 144, 196, 225, 289, 324, 400, 441, 484, 576, 625, 784, 841, 900, 1024, 1156, 1444, 1600, 1764, 1936, 2025, 2209, 2401, 2601, 2809, 3136, 3364, 3600, 3844, 4225, 4489, 4624, 5184, 5776, 6084, 6241, 6400
Offset: 1
Examples
a(21055) = 9427771^2 = 88882866028441, - _Zak Seidov_, Apr 18 2016 a(21056) = 9427980^2 = 88886806880400. - _Robert Israel_, Apr 18 2016
Links
- Zak Seidov, Table of n, a(n) for n = 1..22083
Programs
-
Maple
filter:= proc(n) local L,evens,odds; L:= convert(n,base,10) mod 2; evens:= select(t -> L[t]::even, [$1..nops(L)]); odds:= select(t -> L[t]::odd, [$1..nops(L)]); (evens = []) or (odds = []) or (evens[1]>odds[-1]) or (odds[1]>evens[-1]) end proc: select(filter, [seq(i^2,i=0..100)]); # Robert Israel, Apr 18 2016
-
Mathematica
Select[Range[0, 80]^2, Function[k, Or[Flatten@ # == k, Flatten@ Reverse@ # == k] &@ GatherBy[k, EvenQ]]@ IntegerDigits@ # &] (* Michael De Vlieger, Apr 17 2016 *)
Formula
a(n) = A030477(n)^2. - Andrew Howroyd, Aug 11 2024
Extensions
Offset corrected by Andrew Howroyd, Aug 11 2024
Comments