A256523 Numbers m such that m, m^2 and m^3 have identical initial digits in decimal representation.
0, 1, 10, 11, 12, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a256523 n = a256523_list !! (n-1) a256523_list = [x | x <- [0..], let i = a000030 x, a000030 (x ^ 2) == i, a000030 (x ^ 3) == i]
-
Mathematica
Select[Range[0,1000],Length[Union[(IntegerDigits/@(#^Range[3]))[[;;,1]]]]==1&] (* Harvey P. Dale, Dec 17 2024 *)
-
PARI
initial(n)=digits(n)[1] is(n)=if(n==0, return(1)); my(k=initial(n)); initial(n^2)==k && initial(n^3)==k \\ Charles R Greathouse IV, May 13 2015
Comments