Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A147789
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A147789 a(n) = Round(2*(3/2)^n), using round-to-even method. +0
3
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; listen)
OFFSET

1,1

COMMENT

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.

PROGRAM

(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: A108855 A050572 A105343 this_sequence A047625 A147871 A004397

Adjacent sequences: A147786 A147787 A147788 this_sequence A147790 A147791 A147792

KEYWORD

nonn

AUTHOR

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

EXTENSIONS

Edited by Klaus Brockhaus, Nov 17 2008

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 4 15:11 EST 2009. Contains 170347 sequences.


AT&T Labs Research