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-4 of 4 results.

A064324 a(n) = a(n-1) + floor(a(n-2)/2) with a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 22, 30, 41, 56, 76, 104, 142, 194, 265, 362, 494, 675, 922, 1259, 1720, 2349, 3209, 4383, 5987, 8178, 11171, 15260, 20845, 28475, 38897, 53134, 72582, 99149, 135440, 185014, 252734, 345241, 471608, 644228, 880032
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)+floor(a(3)/2) = 4+floor(3/2) = 5.
		

Crossrefs

Programs

  • Magma
    [n le 2 select n else Self(n-1)+Floor(Self(n-2)/2): n in [1..45]]; // Bruno Berselli, Apr 20 2012
  • Mathematica
    RecurrenceTable[{a[n] == a[n-1] + Floor[a[n-2]/2], a[0] == 1, a[1] == 2}, a, {n, 0, 50}] (* G. C. Greubel, May 04 2019 *)
    nxt[{a_,b_}]:={b,Floor[a/2]+b}; NestList[nxt,{1,2},50][[;;,1]] (* Harvey P. Dale, Jul 28 2023 *)
  • PARI
    { for (n=0, 400, if (n>1, a=a1 + a2\2; a2=a1; a1=a, if (n, a=a1=2, a=a2=1)); write("b064324.txt", n, " ", a) ) }; \\ Harry J. Smith, Sep 11 2009
    

Formula

a(n) = A064323(n) + 1.

A182230 a(n) = a(n-1)+floor(a(n-2)/4) with a(0)=3, a(1)=4.

Original entry on oeis.org

3, 4, 4, 5, 6, 7, 8, 9, 11, 13, 15, 18, 21, 25, 30, 36, 43, 52, 62, 75, 90, 108, 130, 157, 189, 228, 275, 332, 400, 483, 583, 703, 848, 1023, 1235, 1490, 1798, 2170, 2619, 3161, 3815, 4605, 5558, 6709, 8098, 9775, 11799, 14242, 17191, 20751, 25048, 30235
Offset: 0

Views

Author

Alex Ratushnyak, Apr 19 2012

Keywords

Comments

a(n)/a(n-1) tends to (1+sqrt(2))/2 = 1.207106781186547524... [Bruno Berselli, Apr 23 2012]

Crossrefs

Programs

  • Haskell
    a182230 n = a182230_list !! n
    a182230_list = 3 : 4 : zipWith (+)
                           (map (flip div 4) a182230_list) (tail a182230_list)
    -- Reinhard Zumkeller, Apr 30 2015
  • Magma
    [n le 2 select n+2 else Self(n-1)+Floor(Self(n-2)/4): n in [1..52]]; // Bruno Berselli, Apr 20 2012
    
  • Maple
    a:= proc(n) a(n):= a(n-1) +floor(a(n-2)/4) end: a(0), a(1):= 3, 4:
    seq(a(n), n=0..60);  # Alois P. Heinz, Apr 20 2012
  • Mathematica
    RecurrenceTable[{a[0] == 3, a[1] == 4, a[n] == a[n - 1] + Floor[a[n - 2]/4]}, a, {n, 51}] (* Bruno Berselli, Apr 21 2012 *)
  • Python
    prpr = 3
    prev = 4
    for i in range(2,55):
        current = prev + prpr//4
        print(current, end=',')
        prpr = prev
        prev = current
    

A173497 a(n) = a(n-1) + a(n-2) - floor(a(n-2)/2), starting 2,1.

Original entry on oeis.org

2, 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
Offset: 0

Views

Author

Roger L. Bagula, Nov 23 2010

Keywords

Comments

The limiting ratio is a(n+1)/a(n): 1.36602540378443.
This limiting ratio is (1+sqrt(3))/2. - Robert Israel, Aug 30 2020

Crossrefs

Programs

  • Maple
    A[0]:= 2: A[1]:= 1:
    for n from 2 to 100 do
      A[n]:= A[n-1]+A[n-2]-floor(A[n-2]/2)
    od:
    seq(A[i],i=0..100); # Robert Israel, Aug 30 2020
  • Mathematica
    l[0] = 2; l[1] = 1;
    l[n_] := l[n] = l[n - 1] + l[n - 2] - Floor[l[n - 2]/2]
    Table[l[n], {n, 0, 30}]
    RecurrenceTable[{a[0]==2,a[1]==1,a[n]==a[n-1]+a[n-2]-Floor[a[n-2]/2]},a,{n,50}] (* Harvey P. Dale, Apr 26 2016 *)

Formula

a(n) = a(n-1) + a(n-2) - floor(a(n-2)/2).

Extensions

More terms from Max Alekseyev, Jun 18 2011

A173508 a(n) = ceiling(A173497(n)/2).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 6, 8, 11, 15, 20, 28, 38, 52, 71, 97, 132, 181, 247, 337, 461, 629, 860, 1174, 1604, 2191, 2993, 4089, 5585, 7630, 10422, 14237, 19448, 26567, 36291, 49574, 67720, 92507, 126367, 172620, 235804, 322114
Offset: 0

Views

Author

Roger L. Bagula, Nov 23 2010

Keywords

Crossrefs

Programs

  • Maple
    A173497 := proc(n) option remember; if n <= 1 then op(n+1,[2,1]) ; else             procname(n-1)+procname(n-2)-floor(procname(n-2)/2) ; end if; end proc:
    A173508 := proc(n) ceil(A173497(n)/2) ; end proc:
    seq(A173508(n),n=0..60) ;

Extensions

Definition corrected, Mma code related to another sequence removed, sequence extended
Showing 1-4 of 4 results.