OFFSET
0,3
COMMENTS
Decimal expansion of 45387733/3333333330. - Enrique Pérez Herrero, Nov 14 2021
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,1).
FORMULA
MATHEMATICA
digitalRoot[n_Integer?Positive] := FixedPoint[Plus@@IntegerDigits[#]&, n]; Table[If[n==0, 0, digitalRoot[n(n+1)/2]], {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, May 02 2011 *)
PROG
(PARI) a(n)=if(n, n=n*(n+1)/2%9; if(n, n, 9), 0) \\ Charles R Greathouse IV, Dec 19 2016
(Python)
def A145389(n): return (9, 1, 3, 6, 1, 6, 3, 1, 9)[n%9] if n else 0 # Chai Wah Wu, Feb 09 2023
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Reinhard Zumkeller, Oct 10 2008
STATUS
approved