A119509 Positive numbers whose square contains no digit more than once.
1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 16, 17, 18, 19, 23, 24, 25, 27, 28, 29, 31, 32, 33, 36, 37, 42, 43, 44, 48, 49, 51, 52, 53, 54, 55, 57, 59, 61, 64, 66, 69, 71, 72, 73, 74, 78, 79, 82, 84, 86, 87, 89, 93, 95, 96, 98, 99, 113, 116, 117, 118, 124, 126, 128, 133
Offset: 1
Links
- Rick L. Shepherd, Table of n, a(n) for n = 1..610 (full sequence)
Crossrefs
Programs
-
Magma
[n: n in [1..10^5] | #Set(d) eq #d where d is Intseq(n^2)]; // Bruno Berselli, Aug 02 2011
-
Maple
lim:=floor(sqrt(9876543210)): A119509:={}: for n from 1 to lim do pandig:=true: d:=convert(n^2,base,10): for k from 0 to 9 do if(numboccur(k, d)>1)then pandig:=false: break: fi: od: if(pandig)then A119509 := A119509 union {n}: fi: od: op(sort(convert(A119509,list))); # Nathaniel Johnston, Jun 23 2011
-
Mathematica
Select[Range[1000000], Length[IntegerDigits[ # ^2]] == Length[Union[IntegerDigits[ # ^2]]] &] (* Tanya Khovanova, May 29 2007 *) Select[Range[10^5], Max[DigitCount[#^2]] <= 1 &] (* T. D. Noe, Aug 02 2011 *)
-
PARI
is_A119509(n)=#(n=digits(n^2))==#Set(n) \\ M. F. Hasler, Sep 08 2017
-
Python
def ok(n): s = str(n**2); return n > 0 and len(set(s)) == len(s) afull = [k for k in range(10**5) if ok(k)] # Michael S. Branicky, Nov 27 2022
Extensions
More terms from Rick L. Shepherd, Jul 27 2006
Comments