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.

A254374 Digital roots of centered pentagonal numbers (A005891).

Original entry on oeis.org

1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6, 4, 7, 6, 1, 1, 6, 7, 4, 6
Offset: 1

Views

Author

Colin Barker, Jan 29 2015

Keywords

Comments

The sequence is periodic with period 9.

Examples

			a(3) = 7 because the 3rd centered pentagonal number is 16, the digital root of which is 7.
		

Crossrefs

Programs

  • Mathematica
    FixedPoint[Plus @@ IntegerDigits[#] &, #] & /@ Table[(5 n^2 + 5 n + 2)/2, {n, 0, 80}] (* Michael De Vlieger, Feb 01 2015 *)
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 1},{1, 6, 7, 4, 6, 4, 7, 6, 1},86] (* Ray Chandler, Aug 26 2015 *)
    PadRight[{},120,{1,6,7,4,6,4,7,6,1}] (* Harvey P. Dale, Aug 23 2017 *)
  • PARI
    m=5; vector(200, n, (m*n*(n-1)/2)%9+1)

Formula

a(n) = A010888(A005891(n)).
a(n) = a(n-9).
G.f.: -x*(x^8+6*x^7+7*x^6+4*x^5+6*x^4+4*x^3+7*x^2+6*x+1) / ((x-1)*(x^2+x+1)*(x^6+x^3+1)).