login
Power-sum numbers: let n = a_1 a_2 ... a_k be a k-digit number; n is a power-sum number if there are exponents e_1 ... e_m such that n = Sum_{i=1..m} Sum_{j=1..k} a_j^e_i.
(Formerly M0480)
2

%I M0480 #23 Sep 04 2021 13:30:01

%S 1,2,3,4,5,6,7,8,9,10,12,18,20,21,23,24,27,30,36,40,42,45,48,50,54,60,

%T 63,70,72,80,81,84,90,100,102,104,108,110,111,112,113,114,115,116,117,

%U 120,122,126,130,131,132,133,134,135,136,140,144,150,151,152,153,154,156,160,162,170,171,172,173,174,178,180,182

%N Power-sum numbers: let n = a_1 a_2 ... a_k be a k-digit number; n is a power-sum number if there are exponents e_1 ... e_m such that n = Sum_{i=1..m} Sum_{j=1..k} a_j^e_i.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Amiram Eldar, <a href="/A007603/b007603.txt">Table of n, a(n) for n = 1..10000</a>

%H Mike Keith, <a href="/A007629/a007629.pdf">Power-sum numbers</a>, J. Recreational Mathematics, Vol. 18, No. 4 (1986), pp. 275-278. (Annotated scanned copy)

%e 21 = (2+1)+(2^3+1^3)+(2^3+1^3), with e_1, e_2, e_3 = 1, 3, 3.

%t q[n_] := Module[{d = IntegerDigits[n], v = {}, k = 1, s, ans = False}, If[Max[d] == 1, ans = Divisible[n, Total[d]], While[(s = Total[d^k]) <= n, AppendTo[v, s]; If[Length[IntegerPartitions[n, All, v]] > 0, ans = True; Break[]]; k++]]; ans]; Select[Range[200], q] (* _Amiram Eldar_, Sep 04 2021 *)

%Y Subsequences: A005349, A034087, A034088, A169665, A169666.

%K nonn,easy,nice,base

%O 1,2

%A _N. J. A. Sloane_, _Robert G. Wilson v_, _Mira Bernstein_

%E Corrected and extended by _Naohiro Nomoto_, Mar 11 2001