|
|
A189510
|
|
Digital root of n^n.
|
|
3
|
|
|
1, 1, 4, 9, 4, 2, 9, 7, 1, 9, 1, 5, 9, 4, 7, 9, 7, 8, 9, 1, 4, 9, 4, 2, 9, 7, 1, 9, 1, 5, 9, 4, 7, 9, 7, 8, 9, 1, 4, 9, 4, 2, 9, 7, 1, 9, 1, 5, 9, 4, 7, 9, 7, 8, 9, 1, 4, 9, 4, 2, 9, 7, 1, 9, 1, 5, 9, 4, 7, 9, 7, 8, 9, 1, 4, 9, 4, 2, 9, 7, 1, 9, 1, 5, 9, 4, 7
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
For n >= 1, this sequence is periodic with period 18. The sequence repeats [1,4,9,4,2,9,7,1,9,1,5,9,4,7,9,7,8,9]. - Nathaniel Johnston, May 04 2011
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
|
|
FORMULA
|
a(n) = a(n-18) for n > 18.
G.f.: (-8*x^18 - 8*x^17 - 7*x^16 - 9*x^15 - 7*x^14 - 4*x^13 - 9*x^12 - 5*x^11 - x^10 - 9*x^9 - x^8 - 7*x^7 - 9*x^6 - 2*x^5 - 4*x^4 - 9*x^3 - 4*x^2 - x - 1)/(x^18 - 1). (End)
|
|
MAPLE
|
|
|
MATHEMATICA
|
digitalRoot[n_Integer?Positive] := FixedPoint[Plus@@IntegerDigits[#]&, n]; Table[If[n==0, 0, digitalRoot[n^n]], {n, 0, 200}]
Join[{1}, LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 4, 9, 4, 2, 9, 7, 1, 9, 1, 5, 9, 4, 7, 9, 7, 8, 9}, 86]] (* Ray Chandler, Aug 27 2015 *)
|
|
PROG
|
(Python)
def A189510(n): return (9, 1, 4, 9, 4, 2, 9, 7, 1, 9, 1, 5, 9, 4, 7, 9, 7, 8)[n%18] if n else 1 # Chai Wah Wu, Feb 09 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|