A029797 Numbers k such that k^2 and k^3 have the same set of digits.
0, 1, 10, 100, 146, 1000, 1203, 1460, 7652, 8077, 8751, 8965, 10000, 10406, 11914, 12030, 12057, 12586, 12768, 12961, 13055, 14202, 14600, 14625, 16221, 19350, 20450, 21539, 22040, 22175, 23682, 24071, 25089, 25201, 25708, 26653, 26981
Offset: 1
Examples
146 is in the sequence as 146^2 = 21316 has digits {1, 2, 3, 6} and 146^3 = 3112136 has digits {1, 2, 3, 6} as well. - _David A. Corneth_, Nov 13 2023
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[ n: n in [0..34*10^4] | Set(Intseq(n^2)) eq Set(Intseq(n^3)) ]; // Bruno Berselli, Jun 28 2011
-
PARI
isA029797(n)=Set(Vec(Str(n^2)))==Set(Vec(Str(n^3))) \\ Charles R Greathouse IV, Jun 28 2011
Comments