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 A145389 #44 Dec 12 2023 08:24:32 %S A145389 0,1,3,6,1,6,3,1,9,9,1,3,6,1,6,3,1,9,9,1,3,6,1,6,3,1,9,9,1,3,6,1,6,3, %T A145389 1,9,9,1,3,6,1,6,3,1,9,9,1,3,6,1,6,3,1,9,9,1,3,6,1,6,3,1,9,9,1,3,6,1, %U A145389 6,3,1,9,9,1,3,6,1,6,3,1,9,9,1,3,6,1,6 %N A145389 Digital roots of triangular numbers. %C A145389 Decimal expansion of 45387733/3333333330. - _Enrique Pérez Herrero_, Nov 14 2021 %H A145389 <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,0,1). %F A145389 a(n) = A010888(A000217(n)). %F A145389 Periodic sequence for n>0: a(n+9) = a(n); %F A145389 a(A016777(n)) = 1; a(A007494(n)) <> 1; %F A145389 a(A090570(n)) = A010888(A090570(n)). %F A145389 a(n) = 1 + ((n^2 + n - 2)/2) mod 9. - _Ant King_, Apr 25 2009 %F A145389 G.f.: x(1 + 3x + 6x^2 + x^3 + 6x^4 + 3x^5 + x^6 + 9x^7 + 9x^8)/((1-x)(1 + x + x^2)(1 + x^3 + x^6)). - _Ant King_, Nov 16 2010 %t A145389 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 *) %o A145389 (PARI) a(n)=if(n, n=n*(n+1)/2%9; if(n, n, 9), 0) \\ _Charles R Greathouse IV_, Dec 19 2016 %o A145389 (Python) %o A145389 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 %Y A145389 Cf. A000217, A004157, A010888. %K A145389 nonn,base,easy %O A145389 0,3 %A A145389 _Reinhard Zumkeller_, Oct 10 2008