This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A189510 #39 Jul 31 2025 13:38:07 %S A189510 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, %T A189510 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, %U A189510 7,9,7,8,9,1,4,9,4,2,9,7,1,9,1,5,9,4,7 %N A189510 Digital root of n^n. %C A189510 a(n) = A010888(A000312(n)). %C A189510 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 %H A189510 <a href="/index/Rec#order_18">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1). %F A189510 From _Chai Wah Wu_, Feb 09 2023: (Start) %F A189510 a(n) = a(n-18) for n > 18. %F A189510 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) %p A189510 A189510 := proc(n) return ((n^n-1) mod 9) + 1: end: seq(A189510(n), n=0..80); # _Nathaniel Johnston_, May 04 2011 %t A189510 digitalRoot[n_Integer?Positive] := FixedPoint[Plus@@IntegerDigits[#]&,n]; Table[If[n==0,0,digitalRoot[n^n]], {n,0,200}] %t A189510 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 *) %t A189510 PadRight[{1},100,{9,1,4,9,4,2,9,7,1,9,1,5,9,4,7,9,7,8}] (* _Harvey P. Dale_, Jul 31 2025 *) %o A189510 (Python) %o A189510 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 %Y A189510 Cf. A010888, A030132, A145389. %K A189510 nonn,base,easy %O A189510 0,3 %A A189510 _Vladimir Joseph Stephan Orlovsky_, May 02 2011 %E A189510 a(0) corrected by _Reinhard Zumkeller_, May 03 2011