OFFSET
1,2
COMMENTS
Like the other single-digit terms, zero would satisfy the definition (n = Sum_{i=1..k} d[i]^k when d[1..k] are the base 8 digits of n), but here only positive numbers are considered. - M. F. Hasler, Nov 20 2019
LINKS
Joseph Myers, Table of n, a(n) for n = 1..62 (the full list of terms, from Winter)
Eric Weisstein's World of Mathematics, Narcissistic Number
D. T. Winter, Table of Armstrong Numbers
EXAMPLE
From M. F. Hasler, Nov 20 2019: (Start)
20 = 24_8 (in base 8), and 2^2 + 4^2 = 20.
432 = 660_8, and 6^3 + 6^3 + 0^3 = 432; it's easy to see that 432 + 1 then also satisfies the equation, as for any term that is a multiple of 8. (End)
PROG
(PARI) select( {is_A010354(n)=n==vecsum([d^#n|d<-n=digits(n, 8)])}, [0..10^6]) \\ This gives only terms < 10^6, for illustration of is_A010354(). - M. F. Hasler, Nov 20 2019
(Python)
from itertools import islice, combinations_with_replacement
def A010354_gen(): # generator of terms
for k in range(1, 30):
a = tuple(i**k for i in range(8))
yield from (x[0] for x in sorted(filter(lambda x:x[0] > 0 and tuple(int(d, 8) for d in sorted(oct(x[0])[2:])) == x[1], \
((sum(map(lambda y:a[y], b)), b) for b in combinations_with_replacement(range(8), k)))))
CROSSREFS
KEYWORD
base,fini,full,nonn
AUTHOR
EXTENSIONS
Edited by Joseph Myers, Jun 28 2009
STATUS
approved