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 A059930 #29 Mar 23 2021 16:01:37 %S A059930 2,3,4,7,8,9,17,18,24,29,53,54,57,59,72,79,84,209,259,567,807,854 %N A059930 Numbers n such that n and n^2 combined use different digits. %C A059930 There are exactly 22 solutions in base 10. %C A059930 More precisely: the concatenation of n and n^2 does not contain any digit twice. - _M. F. Hasler_, Oct 16 2018 %C A059930 a(20) = 567 and a(22) = 854 are the only two numbers k such that k and k^2 combined use each of the digits 1 to 9 exactly once (reference David Wells): 567^2 = 321489 and 854^2 = 729316. - _Bernard Schott_, Mar 23 2021 %D A059930 M. Kraitchik, Mathematical Recreations, p. 48, Problem 12. - From _N. J. A. Sloane_, Mar 15 2013 %D A059930 David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Revised Edition, 1997, page 144, entry 567. %p A059930 M:=1000; %p A059930 a1:=[]; a2:=[]; %p A059930 for n from 1 to M do %p A059930 # are digits of n and n^2 distinct? %p A059930 t1:=convert(n,base,10); %p A059930 t2:=convert(n^2,base,10); %p A059930 s3:={op(t1),op(t2)}; %p A059930 if nops(t1)+nops(t2) = nops(s3) then a1:=[op(a1),n]; a2:=[op(a2),n^2]; fi; %p A059930 od: %p A059930 a1; a2; %p A059930 # _N. J. A. Sloane_, Mar 15 2013 %t A059930 Select[Range[10000], Intersection[IntegerDigits[ # ], IntegerDigits[ #^2]] == {} && Length[Union[IntegerDigits[ # ], IntegerDigits[ #^2]]] == Length[IntegerDigits[ # ]] + Length[IntegerDigits[ #^2]] &] (* _Tanya Khovanova_, Dec 25 2006 *) %t A059930 Select[Range[10^3], Union@ Tally[Flatten@ IntegerDigits@ {#, #^2}][[All, -1]] == {1} &] (* _Michael De Vlieger_, Oct 17 2018 *) %o A059930 (PARI) select( is(n)=#Set(Vecsmall(n=Str(n,n^2)))==#n, [1..999]) \\ _M. F. Hasler_, Oct 16 2018 %Y A059930 Cf. A059931, A029783 (digits of n are not present in n^2), A112736 (numbers whose squares are exclusionary). %K A059930 nonn,base,fini,full %O A059930 1,1 %A A059930 _Patrick De Geest_, Feb 15 2001