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.

A386969 A variant of Recamán's sequence (A005132): a(0) = 0; for n > 0, a(n) = a(n-1) - n if nonnegative and not already in the sequence, otherwise a(n) = a(n-1) + n + 3.

Original entry on oeis.org

0, 4, 2, 8, 15, 10, 19, 12, 23, 14, 27, 16, 31, 18, 35, 20, 39, 22, 43, 24, 47, 26, 51, 28, 55, 30, 59, 32, 63, 34, 67, 36, 71, 38, 75, 40, 79, 42, 83, 44, 87, 46, 91, 48, 95, 50, 99, 52, 103, 54, 107, 56, 111, 58, 115, 60, 119, 62, 123, 64, 127, 66, 131, 68, 135, 70, 139, 72, 143, 74, 147, 76, 151
Offset: 0

Views

Author

Jules Beauchamp, Aug 11 2025

Keywords

Comments

When visualized in connecting semicircular lines after a(n) = 8 it produces one increasingly large conical spiral.

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[a[n-1] >= n && FreeQ[Table[a[k], {k, 0, n-1}], a[n-1] - n], a[n-1] - n, a[n-1] + n + 3]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Aug 22 2025 *)
Showing 1-1 of 1 results.