%I #12 Apr 12 2024 09:51:27
%S 1,2,4,5,11,12,15,16,21,25,46,65,112,121,125,162,211,215,216,254,461,
%T 465,511,512,515,516,642,665,1116,1121,1125,1211,1242,1246,1454,1465,
%U 1616,2125,2261,2262,5121,5125,5162,6415,6454,6515,6642,6665,11142,11254,12511,12515,16262,21125,21242,25525,51211,51246,51616,65125,66515,66642,66665,111465
%N Numbers k such that k and k^2 use only the digits 1, 2, 4, 5 and 6.
%C Generated with DrScheme.
%H Jonathan Wellons, <a href="/A136988/b136988.txt">Table of n, a(n) for n = 1..980</a>
%H J. Wellons, <a href="https://web.archive.org/web/20090206165028/http://jonathanwellons.com/shared-digits/">Tables of Shared Digits</a> [archived]
%e 645145151616461^2 = 416212266654226451241246164521.
%t Module[{nn=6,c={1,2,4,5,6}},Select[Flatten[Table[FromDigits/@Tuples[c,n],{n,nn}]],SubsetQ[ c,IntegerDigits[#^2]]&]] (* _Harvey P. Dale_, Jun 16 2023 *)
%K base,nonn
%O 1,2
%A Jonathan Wellons (wellons(AT)gmail.com), Jan 22 2008