|
|
A341767
|
|
Replace each digit d in the decimal representation of n with the digital root of n^d.
|
|
3
|
|
|
1, 4, 9, 4, 2, 9, 7, 1, 9, 11, 22, 39, 41, 54, 69, 71, 88, 99, 11, 41, 93, 77, 78, 99, 44, 11, 99, 11, 48, 91, 14, 87, 99, 17, 88, 99, 11, 84, 99, 41, 45, 99, 71, 11, 99, 11, 72, 99, 41, 21, 96, 44, 88, 99, 11, 51, 99, 77, 28, 91, 17, 11, 99, 11, 15, 99, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
If n == 1 (mod 9), then every digit will be replaced by "1". If n == 0 (mod 9), then all nonzero digits will be replaced by "9".
The corresponding n of values a(n)= 1, a(n)= 11, a(n)= 111,... creates a subsequence of A236653. - Davide Rotondo, Mar 04 2024
|
|
LINKS
|
|
|
FORMULA
|
a(10*n) = 10*a(n) + 1.
|
|
EXAMPLE
|
a(26) = 11, since 26^2 = 676 and 26^6 = 308915776. 6 + 7 + 6 = 19, 1 + 9 = 10 and 1 + 0 = 1, so the digital root of 676 is 1. 3 + 0 + 8 + 9 + 1 + 5 + 7 + 7 + 6 = 46, 4 + 6 = 10 and 1 + 0 = 1, so the digital root of 308915776 is 1. Thus, for 26, both "2" and "6" will be replaced by "1".
|
|
MATHEMATICA
|
a[n_] := FromDigits[Mod[n^IntegerDigits[n] - 1, 9] + 1]; Array[a, 100] (* Amiram Eldar, Feb 19 2021 *)
|
|
PROG
|
(Python)
def a(n):
return int(''.join(str((pow(n, int(d), 9)-1)%9 + 1) for d in str(n)))
(PARI) dr(n) = if(n, (n-1)%9+1); \\ A010888
a(n) = my(d=digits(n)); fromdigits(vector(#d, k, dr(n^d[k]))); \\ Michel Marcus, Feb 19 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|