cp's OEIS Frontend

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.

A054038 Numbers k such that k^2 contains every digit at least once.

This page as a plain text file.
%I A054038 #42 Oct 27 2023 22:00:46
%S A054038 32043,32286,33144,35172,35337,35757,35853,37176,37905,38772,39147,
%T A054038 39336,40545,42744,43902,44016,45567,45624,46587,48852,49314,49353,
%U A054038 50706,53976,54918,55446,55524,55581,55626,56532,57321,58413,58455
%N A054038 Numbers k such that k^2 contains every digit at least once.
%C A054038 There are 87 terms < 10^5; these are the n such that n^2 uses each digit exactly once. - _David Wasserman_, Feb 03 2005
%C A054038 The squares in this sequence are in A190682. - _Bruno Berselli_, May 23 2011
%D A054038 J.-M. De Koninck and A. Mercier, 1001 Problemes en Theorie Classique Des Nombres, Problem 239 pp. 39; 178, Ellipses Paris 2004.
%H A054038 Giovanni Resta, <a href="/A054038/b054038.txt">Table of n, a(n) for n = 1..10000</a> (first 4866 terms from Klaus Brockhaus)
%p A054038 f := []; for i from 0 to 200 do if nops({op(convert(i^2,base,10))})=10 then f := [op(f),i] fi; od; f;
%t A054038 A050278 = Select[FromDigits@#&/@Permutations[Range[0, 9], {10}], # > 10^9 &]; Sqrt[Select[A050278, IntegerQ[Sqrt[#]] &]] (* _Alonso del Arte_, Jun 18 2011, based on a program by _Robert G. Wilson v_ *)
%t A054038 Select[Sqrt[#]&/@FromDigits/@Select[Permutations[Range[0,9]],#[[1]]>0&], IntegerQ] (* _Harvey P. Dale_, May 26 2016 *)
%o A054038 (Magma) IsA054038:=func< n | Seqset(Intseq(n^2)) eq {0,1,2,3,4,5,6,7,8,9} >; [ n: n in [1..60000] | IsA054038(n) ]; // _Klaus Brockhaus_, May 16 2011
%o A054038 (PARI) is(n)=#vecsort(Vec(Str(n^2)),,8)==10 \\ _Charles R Greathouse IV_, Jun 18 2011
%o A054038 (Python)
%o A054038 def ok(n): return len(set(str(n**2))) == 10
%o A054038 print([k for k in range(10**5) if ok(k)]) # _Michael S. Branicky_, Dec 23 2022
%Y A054038 Cf. A016069, A054031, A054032, A054033, A054034, A054035, A054036, A054037, A054039.
%K A054038 nonn,base
%O A054038 1,1
%A A054038 _Asher Auel_, Feb 28 2000
%E A054038 More terms from _David Wasserman_, Feb 03 2005