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.

A118525 Start with 1 and repeatedly reverse the digits and add 6 to get the next term.

Original entry on oeis.org

1, 7, 13, 37, 79, 103, 307, 709, 913, 325, 529, 931, 145, 547, 751, 163, 367, 769, 973, 385, 589, 991, 205, 508, 811, 124, 427, 730, 43, 40, 10, 7, 13, 37, 79, 103, 307, 709, 913, 325, 529, 931, 145, 547, 751, 163, 367, 769, 973, 385, 589, 991
Offset: 1

Views

Author

N. J. A. Sloane, May 06 2006

Keywords

Comments

After the initial term, the sequence enters the cycle (7, 13, 37, ..., 10) of length 30.

Crossrefs

Programs

  • Mathematica
    NestList[FromDigits[Reverse[IntegerDigits[#]]]+6&,1,60]  (* Harvey P. Dale, Apr 22 2011 *)
  • PARI
    a(n,s=1)={n>1&&for(i=0,(n-2)%30,s=R(s)+6);s} \\ R =  A004086. - M. F. Hasler, May 22 2014

Formula

a(n) = a((n-2 mod 30)+2) for all n>1. - M. F. Hasler, May 22 2014