login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A189510 Digital root of n^n. 3

%I #37 Feb 09 2023 21:56:42

%S 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 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 7,9,7,8,9,1,4,9,4,2,9,7,1,9,1,5,9,4,7

%N Digital root of n^n.

%C a(n) = A010888(A000312(n)).

%C 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 <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 From _Chai Wah Wu_, Feb 09 2023: (Start)

%F a(n) = a(n-18) for n > 18.

%F 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 := proc(n) return ((n^n-1) mod 9) + 1: end: seq(A189510(n), n=0..80); # _Nathaniel Johnston_, May 04 2011

%t digitalRoot[n_Integer?Positive] := FixedPoint[Plus@@IntegerDigits[#]&,n]; Table[If[n==0,0,digitalRoot[n^n]], {n,0,200}]

%t 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 *)

%o (Python)

%o 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 Cf. A010888, A030132, A145389.

%K nonn,base,easy

%O 0,3

%A _Vladimir Joseph Stephan Orlovsky_, May 02 2011

%E a(0) corrected by _Reinhard Zumkeller_, May 03 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 08:30 EDT 2024. Contains 372290 sequences. (Running on oeis4.)