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.

A363653 a(1) = 1; for n > 1, a(n) = a(n-1) - A000005(n) if a(n) strictly positive, else a(n) = a(n-1) + A000005(n).

Original entry on oeis.org

1, 3, 1, 4, 2, 6, 4, 8, 5, 1, 3, 9, 7, 3, 7, 2, 4, 10, 8, 2, 6, 2, 4, 12, 9, 5, 1, 7, 5, 13, 11, 5, 1, 5, 1, 10, 8, 4, 8, 16, 14, 6, 4, 10, 4, 8, 6, 16, 13, 7, 3, 9, 7, 15, 11, 3, 7, 3, 1, 13, 11, 7, 1, 8, 4, 12, 10, 4, 8, 16, 14, 2, 4, 8, 2, 8, 4, 12, 10, 20, 15, 11, 9, 21
Offset: 1

Views

Author

Ctibor O. Zizka, Jun 13 2023

Keywords

Comments

Variation on Recamán's sequence A005132.

Examples

			a(1) = 1
a(2) = 1 + A000005(2) = 3
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = Module[{d = DivisorSigma[0, n]}, If[a[n - 1] > d, a[n - 1] - d, a[n - 1] + d]]; Array[a, 100] (* Amiram Eldar, Jun 13 2023 *)