login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257763 Zeroless numbers n such that n and n^2 have the same set of decimal digits. 5
1, 4762, 4832, 12385, 14829, 26394, 34196, 36215, 49827, 68474, 72576, 74528, 79286, 79836, 94583, 94867, 96123, 98376, 123385, 123546, 124235, 124365, 124579, 124589, 125476, 125478, 126969, 129685, 135438, 139256, 139261, 139756, 149382, 152385, 156242 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..10000

FORMULA

{A029793} intersect {A052382}.

EXAMPLE

4762 is in the sequence because it is zeroless and 4762^2 = 22676644 has the same set of decimal digits as 4762: {2,4,6,7}.

MAPLE

a:= proc(n) option remember; local k, s;

      for k from 1+`if`(n=1, 0, a(n-1)) do

        s:= {convert(k, base, 10)[]};

        if not 0 in s and s={convert(k^2, base, 10)[]}

           then return k fi

      od

    end:

seq(a(n), n=1..10);

MATHEMATICA

sameQ[n_]:=Union[IntegerDigits[n]]==Union[IntegerDigits[n^2]]; Select[Range@156242, And[FreeQ[IntegerDigits[#], 0], sameQ[#]]&] (* Ivan N. Ianakiev, May 08 2015 *)

PROG

(Python)

A257763_list = [n for n in range(1, 10**6) if not '0' in str(n) and set(str(n)) == set(str(n**2))] # Chai Wah Wu, May 31 2015

(PARI) isok(n) = vecmin(d=digits(n)) && Set(d) == Set(digits(n^2)); \\ Michel Marcus, May 31 2015

CROSSREFS

Cf. A029793, A052382, A257760.

Sequence in context: A250467 A183267 A258231 * A260293 A031567 A031747

Adjacent sequences:  A257760 A257761 A257762 * A257764 A257765 A257766

KEYWORD

nonn,base

AUTHOR

Alois P. Heinz, May 07 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 21 03:33 EDT 2021. Contains 343145 sequences. (Running on oeis4.)