cp's OEIS Frontend

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.

A145389 Digital roots of triangular numbers.

Original entry on oeis.org

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, 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, 6, 3, 1, 9, 9, 1, 3, 6, 1, 6, 3, 1, 9, 9, 1, 3, 6, 1, 6
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 10 2008

Keywords

Comments

Decimal expansion of 45387733/3333333330. - Enrique Pérez Herrero, Nov 14 2021

Crossrefs

Programs

  • 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 *)
  • 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

Formula

a(n) = A010888(A000217(n)).
Periodic sequence for n>0: a(n+9) = a(n);
a(A016777(n)) = 1; a(A007494(n)) <> 1;
a(A090570(n)) = A010888(A090570(n)).
a(n) = 1 + ((n^2 + n - 2)/2) mod 9. - Ant King, Apr 25 2009
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