A114135 Primitive numbers n such that the sums of the digits of n, n^2 and n^3 coincide (cf. A111434).
1, 468, 585, 5851, 5868, 28845, 58968, 21688965, 29588877, 37848897, 49879981, 58577797, 79898994, 79958368, 79979698, 89757468, 109699677, 159699969, 468957888, 479597652, 479896587, 480749985, 494899398, 497349981, 498678256
Offset: 1
Links
- Toshitaka Suzuki and Nikhil Mahajan, Table of n, a(n) for n = 1..600 (first 325 terms from Toshitaka Suzuki)
Programs
-
Mathematica
sod[n_] := Plus @@ IntegerDigits@n; lst = {}; Do[ If[(Mod[n, 9] == 0 || Mod[n, 9] == 1) && Mod[n, 10] != 0 && sod@n == sod[n2] == sod[n3], AppendTo[lst, n]], {n, 108/2}]; lst Select[Range[5*10^8],Length[Union[Total/@IntegerDigits/@{#,#^2,#^3}]]==1 && Mod[#,10]!=0&] (* Harvey P. Dale, Jul 07 2020 *)
-
PARI
isok(n) = (n % 10) && ((sd=sumdigits(n)) == sumdigits(n^2)) && (sd == sumdigits(n^3)); \\ Michel Marcus, Jan 20 2015
Comments