login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064323 a(n) = a(n-1)+ceiling(a(n-2)/2) with a(0)=0, a(1)=1. 5

%I #24 Jan 26 2023 22:06:12

%S 0,1,1,2,3,4,6,8,11,15,21,29,40,55,75,103,141,193,264,361,493,674,921,

%T 1258,1719,2348,3208,4382,5986,8177,11170,15259,20844,28474,38896,

%U 53133,72581,99148,135439,185013,252733,345240,471607,644227,880031,1202145

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

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

%H Harry J. Smith, <a href="/A064323/b064323.txt">Table of n, a(n) for n = 0..400</a>

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

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

%p a:= proc(n) option remember;

%p `if`(n<2, n, a(n-1)+ceil(a(n-2)/2))

%p end:

%p seq(a(n), n=0..48); # _Alois P. Heinz_, Jan 26 2023

%t 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 *)

%o (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

%o (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

%o (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

%Y Cf. A064324, A332133.

%K nonn

%O 0,4

%A _Henry Bottomley_, Sep 11 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 10 05:56 EDT 2024. Contains 375044 sequences. (Running on oeis4.)