A010354 Base-8 Armstrong or narcissistic numbers (written in base 10).
1, 2, 3, 4, 5, 6, 7, 20, 52, 92, 133, 307, 432, 433, 16819, 17864, 17865, 24583, 25639, 212419, 906298, 906426, 938811, 1122179, 2087646, 3821955, 13606405, 40695508, 423056951, 637339524, 6710775966, 13892162580, 32298119799, 97095152738, 98250308556, 98317417420, 125586038802
Offset: 1
Examples
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)
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
Crossrefs
Programs
-
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))))) A010354_list = list(islice(A010354_gen(),20)) # Chai Wah Wu, Apr 20 2022
Extensions
Edited by Joseph Myers, Jun 28 2009
Comments