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.

A380820 a(0) = 0, a(1) = 1, and for n >= 2, a(n) = a(n-1) + a(n-2) if a(n-1) < n, otherwise a(n-1) - n.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 1, 9, 0, 9, 9, 18, 5, 23, 8, 31, 14, 45, 26, 6, 32, 10, 42, 18, 60, 34, 7, 41, 12, 53, 22, 75, 42, 8, 50, 14, 64, 26, 90, 50, 9, 59, 16, 75, 30, 105, 58, 10, 68, 18, 86, 34, 120, 66, 11, 77, 20, 97, 38, 135, 74, 12, 86, 22, 108, 42, 150
Offset: 0

Views

Author

Ya-Ping Lu, Feb 04 2025

Keywords

Comments

Sequence starts with the first 7 Fibonacci numbers. For n >= 12, a(n) takes the values of (8*n+30)/7, (n+22)/7, (9*n+35)/7, (2*n+26)/7, (11*n+41)/7, (4*n+30)/7, and (15*n+45)/7 sequentially for n = 5, 6, 0, 1, 2, 3, 4 mod 7 (see plot in Links), which correspond to A017089 (n>=2), A000027 (n>=5), A017221 (n>=2), A005843 (n>=4), A017497 (n>=2), A016825 (n>=3), and A008597 (n>=3), respectively.
Terms for n >= 16 are the same as A322558(n) for n >= 17.

Crossrefs

Programs

  • Mathematica
    s={0,1};Do[AppendTo[s,If[s[[-1]]James C. McMahon, Feb 14 2025 *)
  • Python
    def A380820(n): R = [0, 1, 1, 2, 3, 5, 8, 1, 9, 0, 9, 9]; X = [9, 2, 11, 4, 15, 8, 1]; Y = [35, 26, 41, 30, 45, 30, 22]; return R[n] if n < 12 else (X[n%7]*n + Y[n%7])//7

Formula

a(n) = A322558(n+1) for n >= 16.
Showing 1-1 of 1 results.