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!)
A182230 a(n) = a(n-1)+floor(a(n-2)/4) with a(0)=3, a(1)=4. 4

%I #37 Sep 08 2022 08:45:55

%S 3,4,4,5,6,7,8,9,11,13,15,18,21,25,30,36,43,52,62,75,90,108,130,157,

%T 189,228,275,332,400,483,583,703,848,1023,1235,1490,1798,2170,2619,

%U 3161,3815,4605,5558,6709,8098,9775,11799,14242,17191,20751,25048,30235

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

%C a(n)/a(n-1) tends to (1+sqrt(2))/2 = 1.207106781186547524... [_Bruno Berselli_, Apr 23 2012]

%H Bruno Berselli, <a href="/A182230/b182230.txt">Table of n, a(n) for n = 0..1000</a>

%p a:= proc(n) a(n):= a(n-1) +floor(a(n-2)/4) end: a(0), a(1):= 3, 4:

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Apr 20 2012

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

%o (Python)

%o prpr = 3

%o prev = 4

%o for i in range(2,55):

%o current = prev + prpr//4

%o print(current, end=',')

%o prpr = prev

%o prev = current

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

%o (Haskell)

%o a182230 n = a182230_list !! n

%o a182230_list = 3 : 4 : zipWith (+)

%o (map (flip div 4) a182230_list) (tail a182230_list)

%o -- _Reinhard Zumkeller_, Apr 30 2015

%Y Cf. A064323, A064324, A182229, A182280; A174968.

%K nonn

%O 0,1

%A _Alex Ratushnyak_, Apr 19 2012

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 March 28 05:02 EDT 2024. Contains 371235 sequences. (Running on oeis4.)