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.

Showing 1-1 of 1 results.

A129000 Start with an integer (in this case, 1). First, add 5 or 8 if the integer is odd or even, respectively. Then divide by 2.

Original entry on oeis.org

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

Views

Author

Adam F. Schwartz (adam_s(AT)mit.edu), May 01 2007

Keywords

Examples

			a(7) = 6 because (7 + 5)/2 = 6.
		

Crossrefs

Programs

  • Mathematica
    a={1};k=1;For[n=1,n<70,n++,If[EvenQ[k],k=k+8,k=k+5];k=k/2;AppendTo[a, k]]; a (* Stefan Steinerberger, May 26 2007 *)

Formula

a(n) = (a(n-1) + b)/d, if a(n) even = (a(n-1) + c)/d, if a(n) odd (starting with a(1)=1, b=5, c=8, d=2).

Extensions

More terms from Stefan Steinerberger, May 26 2007
Showing 1-1 of 1 results.