login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A335151 Numbers m equal to |d_1^k + Sum_{j=2..k} (-1)^j*d_j^k| where d_1 d_2 ... d_k is the decimal expansion of m. 1
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 370, 5295, 8208, 54900, 54901, 417889, 136151168, 9905227379, 282185923199, 2527718648914, 14441494066365380, 14441494066365381, 12317155720243258398, 13393750378644587854 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
In other words: m = |digit1^k + digit2^k - digit3^k + digit4^k -...+/- lastdigit^k|, where k is the number of digits. Note that the sign of the first two addends is always positive.
Concept derived from the Armstrong numbers (A005188).
Note that a(15) = a(14) + 1 and a(22) = a(21) + 1. - Chai Wah Wu, May 31 2020
LINKS
EXAMPLE
370 = |3^3 + 7^3 - 0^3|.
5295 = |5^4 + 2^4 - 9^4 + 5^4|.
8208 = |8^4 + 2^4 - 0^4 + 8^4|.
54900 = |5^5 + 4^5 - 9^5 + 0^5 - 0^5|.
54901 = |5^5 + 4^5 - 9^5 + 0^5 - 1^5|.
MATHEMATICA
ss[n_] := ss[n] = Join[{1}, -(-1)^Range[n-1]]; Select[ Range[0, 500000], (d = IntegerDigits[#]; # == Abs@ Total[d^Length[d] ss@ Length@ d]) &] (* Giovanni Resta, May 25 2020 *)
PROG
(PARI) is(k) = my(v=digits(k)); !k || abs(v[1]^#v + sum(i=2, #v, (-1)^i*v[i]^#v))==k; \\ Jinyuan Wang, May 28 2020
CROSSREFS
Sequence in context: A308110 A306593 A046469 * A065110 A307887 A362843
KEYWORD
nonn,base,fini,more
AUTHOR
Lukas R. Mansour, May 25 2020
EXTENSIONS
a(18)-a(20) from Giovanni Resta, May 25 2020
a(21)-a(22) from Chai Wah Wu, May 31 2020
a(23)-a(24) from Chai Wah Wu, Jun 01 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 12:47 EDT 2024. Contains 372387 sequences. (Running on oeis4.)