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.

A061501 a(1) = 1, a(n+1) = (a(n) + n) mod 10.

Original entry on oeis.org

1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1, 1, 2, 4, 7, 1
Offset: 1

Views

Author

Amarnath Murthy, May 06 2001

Keywords

Comments

First row of array shown below.
a(n) = most significant digit of A062273(n).
Period 20: repeat [1, 2, 4, 7, 1, 6, 2, 9, 7, 6, 6, 7, 9, 2, 6, 1, 7, 4, 2, 1]. - Peter M. Chema, Feb 12 2017

Examples

			1 2 4 7 1 6 2 9 7 6 6 ...
3 5 8 2 7 3 0 8 7 7 ...
6 9 3 8 4 1 9 8 8 ...
0 4 9 5 2 0 9 9 ...
5 0 6 3 1 0 0 ...
1 7 4 2 1 1 ...
		

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, Mod[a[[n - 1]] + n - 1, 10]], {n, 2, 120}]; a (* Michael De Vlieger, Feb 13 2017 *)
  • PARI
    a(n)=if(n==1,return(1));(a(n-1)+n-1)%10
    for(n=1,50,print1(a(n),", ")) \\ Derek Orr, Feb 26 2017

Formula

a(n) = A008954(n-1) + 1.
a(n) = A000124(n) mod 10. - Peter M. Chema, Feb 11 2017
From Chai Wah Wu, Jan 09 2020: (Start)
a(n) = a(n-5) - a(n-10) + a(n-15) for n > 15.
G.f.: x*(-x^14 - 2*x^13 - 4*x^12 - 7*x^11 - x^10 - 5*x^9 - 5*x^7 - 5*x^5 - x^4 - 7*x^3 - 4*x^2 - 2*x - 1)/(x^15 - x^10 + x^5 - 1). (End)

Extensions

Better description and more terms from Larry Reeves (larryr(AT)acm.org), May 08 2001