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.

A064323 a(n) = a(n-1)+ceiling(a(n-2)/2) with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 6, 8, 11, 15, 21, 29, 40, 55, 75, 103, 141, 193, 264, 361, 493, 674, 921, 1258, 1719, 2348, 3208, 4382, 5986, 8177, 11170, 15259, 20844, 28474, 38896, 53133, 72581, 99148, 135439, 185013, 252733, 345240, 471607, 644227, 880031, 1202145
Offset: 0

Views

Author

Henry Bottomley, Sep 11 2001

Keywords

Comments

a(n)/a(n-1) approaches (1+sqrt(3))/2 = 1.3660254... = A332133 for large n.

Examples

			a(5) = a(4)+ceiling(a(3)/2) = 3+ceiling(2/2) = 4.
		

Crossrefs

Programs

  • Magma
    [n le 2 select n-1 else Self(n-1)+Ceiling(Self(n-2)/2): n in [1..45]]; // Bruno Berselli, Apr 20 2012
  • Maple
    a:= proc(n) option remember;
          `if`(n<2, n, a(n-1)+ceil(a(n-2)/2))
        end:
    seq(a(n), n=0..48);  # Alois P. Heinz, Jan 26 2023
  • Mathematica
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==a[n-1]+Ceiling[a[n-2]/2]},a,{n,50}] (* Harvey P. Dale, Nov 06 2013 *)
  • PARI
    for (n=0, 400, if (n>1, a=a1 + ceil(a2/2); a2=a1; a1=a, if (n, a=a1=1, a=a2=0)); write("b064323.txt", n, " ", a) )  \\ Harry J. Smith, Sep 11 2009
    
  • PARI
    first(n)=if(n<2, return([0,1][1..n+1])); my(v=vector(n+1)); v[2]=1; for(k=3,n+1, v[k]=v[k-1]+(v[k-2]+1)\2); v \\ Charles R Greathouse IV, Jan 26 2023
    

Formula

a(n) = A064324(n)-1.