OFFSET
1,3
COMMENTS
Whenever 3|a(n), then a(n+1) = a(n) + 1 (for the same k). The first 6 terms are exactly all the base-3 narcissistic numbers (where k = number of base-3 digits). For these numbers in other bases b = 4, ..., 16 see A010344 - A161953. - M. F. Hasler, Nov 18 2019
LINKS
Joseph Myers, Table of n, a(n) for n = 1..6130 (complete to 2000 base-3 digits)
PROG
(PARI) select( is_A162216(n, b=3)={n<b||forstep(k=logint(n, max(vecmax(b=digits(n, b)), 2)), 2, -1, my(s=vecsum([d^k|d<-b])); s>n||return(s==n))}, [0..10^5]) \\ M. F. Hasler, Nov 21 2019
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Joseph Myers, Jun 28 2009
STATUS
approved