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.

A011369 a(n+1) = a(n) - F(n) if > 0, otherwise a(n) + F(n), where F() are Fibonacci numbers; a(0) = 0.

Original entry on oeis.org

0, 0, 1, 2, 4, 1, 6, 14, 1, 22, 56, 1, 90, 234, 1, 378, 988, 1, 1598, 4182, 1, 6766, 17712, 1, 28658, 75026, 1, 121394, 317812, 1, 514230, 1346270, 1, 2178310, 5702888, 1, 9227466, 24157818, 1, 39088170, 102334156, 1, 165580142, 433494438, 1, 701408734, 1836311904
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Module[{n = 0, f}, NestList[If[(f = Fibonacci[n++]) < #, # - f, # + f] &, 0, 49]] (* Paolo Xausa, Nov 08 2024 *)
    Flatten[Join[{0, 0}, Table[{1, Fibonacci[{k, k+2}] + 1}, {k, 2, 49, 3}]]] (* Paolo Xausa, Nov 08 2024 *)
    LinearRecurrence[{1, 0, 4, -4, 0, 1, -1}, {0, 0, 1, 2, 4, 1, 6, 14, 1}, 50] (* Paolo Xausa, Nov 08 2024 *)
  • PARI
    a(n) = if (n==0, 0, my(d=a(n-1)-fibonacci(n-1)); if (d>0, d, d+2*fibonacci(n-1))) \\ Michel Marcus, Dec 29 2018
    
  • PARI
    a(n) = if (n<=1, 0, my(m=(n % 3)); if (m==0, fibonacci(n-1)+1, if (m==1, fibonacci(n)+1, 1))); \\ Michel Marcus, Dec 29 2018

Formula

a(n) = 0, if n <= 1; F(n-1)+1, if n == 0 (mod 3); F(n)+1, if n == 1 (mod 3); 1, if n == 2 (mod 3). - David W. Wilson; corrected by Michel Marcus, Dec 29 2018
For n>=1, a(n) = F(0)<+>F(1)<+>...<+>F(n-1), where operation <+> is defined in comment in A245618. - Vladimir Shevelev, Nov 05 2014
Empirical g.f.: -x^2*(2*x^6 - x^4 + 7*x^3 - 2*x^2 - x - 1) / ((x-1)*(x^2 + x - 1)*(x^4 - x^3 + 2*x^2 + x + 1)). - Colin Barker, Nov 06 2014

Extensions

Name edited by Michel Marcus, Dec 29 2018