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.

A257763 Zeroless numbers n such that n and n^2 have the same set of decimal digits.

Original entry on oeis.org

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
Offset: 1

Views

Author

Alois P. Heinz, May 07 2015

Keywords

Examples

			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}.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    isok(n) = vecmin(d=digits(n)) && Set(d) == Set(digits(n^2)); \\ Michel Marcus, May 31 2015
  • 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
    

Formula

{A029793} intersect {A052382}.