|
|
A100401
|
|
Digital root of 3^n.
|
|
2
|
|
|
1, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
This sequence also gives the digital root of 12^n, 21^n, 30^n, 39^n, 48^n, 57^n, ... (any k^n where k is congruent to 3 mod 9). - Timothy L. Tiffin, Dec 02 2023
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 9 for n >= 2.
G.f.: (1+2x+6x^2)/(1-x).
a(n) = A100403(n) for n <> 1. (End)
|
|
EXAMPLE
|
For n=14, the digits of 3^14 = 4782969 sum to 45, whose digits sum to 9. So, a(14) = 9.
|
|
MATHEMATICA
|
|
|
PROG
|
(Sage) [power_mod(3, n, 18) for n in range(105)] # Zerinvary Lajos, Nov 25 2009
(PARI) a(n) = if( n<2, [1, 3][n+1], 9); \\ Joerg Arndt, Dec 03 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|