OFFSET
1,3
COMMENTS
Numbers n equal to |Sum_{j=1..k} (-1)^j*d_j^k| where d_1 d_2 ... d_k is the decimal expansion of n. A variant of narcissistic numbers (A005188), they are finite as well.
The last term is smaller than 1.2*10^50. - Jinyuan Wang, May 28 2020
Note that a(14) = a(13) + 1, a(29) = a(28) + 1 - Chai Wah Wu, Jun 03 2020
EXAMPLE
5921 is a term because |5^4 - 9^4 + 2^4 - 1^4| = 5921.
MATHEMATICA
s[n_] := Block[{d = IntegerDigits@ n}, Abs@ Total[d^Length[d] (-1)^Range@ Length@ d]]; Select[ Range[0, 3*10^6], s[#] == # &]
PROG
(PARI) is(k)= my(v=digits(k)); abs(sum(i=1, #v, (-1)^i*v[i]^#v))==k; \\ Jinyuan Wang, May 28 2020
CROSSREFS
KEYWORD
nonn,base,fini,more
AUTHOR
Giovanni Resta, May 26 2020
EXTENSIONS
a(24)-a(25) from Chai Wah Wu, May 31 2020
a(26) from Chai Wah Wu, Jun 01 2020
a(27)-a(31) from Chai Wah Wu, Jun 03 2020
STATUS
approved