login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A147789 a(n) = Round(2*(3/2)^n), using round-to-even method. 2
3, 4, 7, 10, 15, 23, 34, 51, 77, 115, 173, 259, 389, 584, 876, 1314, 1971, 2956, 4434, 6651, 9976, 14964, 22445, 33668, 50502, 75754, 113630, 170445, 255668, 383502, 575253, 862880, 1294320, 1941479, 2912219, 4368329, 6552493, 9828740, 14743110 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

See Wikipedia link and MathWorld link for different methods of rounding half-integers.

Different from recursion a(1) = 3, a(n) = Round(a(n-1)*3/2) for n > 1, which gives a(2) = 4, a(3) = 6, a(4) = 9, a(5) = 14, ... (see A147790).

LINKS

Wikipedia, Rounding

Eric Weisstein's MathWorld, Nearest Integer Function

EXAMPLE

a(4) = Round(2*(3/2)^4) = Round(81/8) = Round(10+1/8) = 10.

MATHEMATICA

Round[2(3/2)^Range[40]] (* From Harvey P. Dale, Feb 04 2012 *)

PROG

(MAGMA) RoundToEven:=function(n); d:=Floor(n); if n-d ne 1/2 then return Round(n); else return d+(d mod 2); end if; end function; [ RoundToEven(2*(3/2)^n):n in [1..39] ]; [From 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)} {for(n=1, 39, print1(RoundToEven(2*(3/2)^n), ", "))} [From Klaus Brockhaus, Nov 17 2008]

CROSSREFS

Cf. A061418, A147788, A147790.

Sequence in context: A108579 A050572 A105343 * A047625 A147871 A004397

Adjacent sequences:  A147786 A147787 A147788 * A147790 A147791 A147792

KEYWORD

nonn,changed

AUTHOR

Vladimir Orlovsky (4vladimir(AT)gmail.com), Nov 13 2008

EXTENSIONS

Edited by Klaus Brockhaus, Nov 17 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 15:39 EST 2012. Contains 205635 sequences.