A100401 Digital root of 3^n.
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
Offset: 0
Examples
For n=14, the digits of 3^14 = 4782969 sum to 45, whose digits sum to 9. So, a(14) = 9.
Links
- Index entries for linear recurrences with constant coefficients, signature (1).
Crossrefs
Programs
-
Mathematica
Table[PowerMod[3, n, 18], {n, 0, 100}] (* Timothy L. Tiffin, Dec 03 2023 *) PadRight[{1,3}, 100, 9] (* Timothy L. Tiffin, Dec 03 2023 *)
-
PARI
a(n) = if( n<2, [1,3][n+1], 9); \\ Joerg Arndt, Dec 03 2023
-
Sage
[power_mod(3,n,18) for n in range(105)] # Zerinvary Lajos, Nov 25 2009
Formula
a(n) = 3^n mod 18. - Zerinvary Lajos, Nov 25 2009
From Timothy L. Tiffin, Nov 30 2023: (Start)
a(n) = 9 for n >= 2.
G.f.: (1+2x+6x^2)/(1-x).
a(n) = A100403(n) for n <> 1. (End)
a(n) = A010888(A001021(n)) = A010888(A009965(n)) = A010888(A009974(n)) = A010888(A009983(n)) = A010888(A009992(n)) = A010888(A225374(n)). - Timothy L. Tiffin, Dec 02 2023
E.g.f.: 9*exp(x) - 6*x - 8. - Elmo R. Oliveira, Aug 08 2024
Comments