The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A147790 a(1) = 3, a(n) = round(a(n-1)*3/2) for n > 1, using round-to-even method. 2
3, 4, 6, 9, 14, 21, 32, 48, 72, 108, 162, 243, 364, 546, 819, 1228, 1842, 2763, 4144, 6216, 9324, 13986, 20979, 31468, 47202, 70803, 106204, 159306, 238959, 358438, 537657, 806486, 1209729, 1814594, 2721891, 4082836, 6124254, 9186381, 13779572 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
See Wikipedia link and MathWorld link for different methods of rounding half-integers.
LINKS
Eric Weisstein's MathWorld, Nearest Integer Function
Wikipedia, Rounding
EXAMPLE
a(2) = round(3*3/2) = 4;
a(3) = round(4*3/2) = 6;
a(4) = round(6*3/2) = 9.
MATHEMATICA
lst={}; s=2; Do[s=Round[s*1.5]; AppendTo[lst, s], {n, 1, 5!}]; lst
NestList[Round[3 #/2]&, 3, 40] (* Harvey P. Dale, Sep 15 2011 *)
PROG
(Magma) RoundToEven:=function(n); d:=Floor(n); return n-d ne 1/2 select Round(n) else d+(d mod 2); end function; [ n eq 1 select 3 else RoundToEven(Self(n-1)*3/2): n in [1..39] ]; // Klaus Brockhaus, Nov 17 2008
(PARI) {RoundToEven(n)=local(d); d=divrem(n, 1); if(d[2]<>1/2, round(n), d[1]+d[1]%2)} {a=2; while(a<10^7, print1(a=RoundToEven(a*3/2), ", "))} \\ Klaus Brockhaus, Nov 17 2008
CROSSREFS
Sequence in context: A352095 A030712 A025000 * A048577 A107340 A326655
KEYWORD
nonn,changed
AUTHOR
EXTENSIONS
Edited by Klaus Brockhaus, Nov 17 2008
STATUS
approved

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 May 13 01:02 EDT 2024. Contains 372497 sequences. (Running on oeis4.)