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.

A341312 a(n) = a(n-1) + a(n-3) unless a(n-1) and a(n-3) are both even in which case a(n) = (a(n-1) + a(n-3))/2, with a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 3, 6, 5, 8, 7, 12, 10, 17, 29, 39, 56, 85, 124, 90, 175, 299, 389, 564, 863, 1252, 908, 1771, 3023, 3931, 5702, 8725, 12656, 9179, 17904, 15280, 24459, 42363, 57643, 82102, 124465, 182108, 132105, 256570, 219339, 351444, 304007, 523346, 437395, 741402, 632374
Offset: 0

Views

Author

N. J. A. Sloane, Feb 16 2021

Keywords

Comments

A sequence intermediate between Narayana's A000930 and Reed Kelly's A214551.
It will be interesting to compare the growth rates of A000930 (well-understood), A241551 (a mystery), the present sequence, and A341313.
It appears that the equation log(a(n)) = 0.296869*n - 4.69131 is a good fit to the data (see the figures). - Hugo Pfoertner, Feb 17 2021

Crossrefs

Programs

  • Maple
    RK2:=proc(n) local t1; option remember;
    if n <= 2 then 1 else t1:=RK2(n-3)+RK2(n-1);
       if (RK2(n-3) mod 2) = 0 and (RK2(n-1) mod 2) = 0 then t1:=t1/2; fi;
    t1; fi; end;
    [seq(RK2(n),n=0..60)];
  • PARI
    a341312(nterms)={my(a=vector(nterms));a[1]=a[2]=1;a[3]=2;for(n=4,nterms,a[n]=if(a[n-1]%2==0&&a[n-3]%2==0,(a[n-1]+a[n-3])/2,a[n-1]+a[n-3]));concat([1],a)};
    a341312(60) \\ Hugo Pfoertner, Feb 17 2021