Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

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

1,1

COMMENT

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

LINKS

Wikipedia, Rounding

Eric Weisstein's MathWorld, Nearest Integer Function

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

PROGRAM

(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] ]; [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)} {a=2; while(a<10^7, print1(a=RoundToEven(a*3/2), ", "))} [From Klaus Brockhaus, Nov 17 2008]

CROSSREFS

Cf. A061418, A147788, A147789.

Sequence in context: A005626 A030712 A025000 this_sequence A048577 A107340 A018830

Adjacent sequences: A147787 A147788 A147789 this_sequence A147791 A147792 A147793

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 November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research