login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063871 Trajectory of 3 under map n->7n-1 if n odd, n->n/2 if n even. 3
3, 20, 10, 5, 34, 17, 118, 59, 412, 206, 103, 720, 360, 180, 90, 45, 314, 157, 1098, 549, 3842, 1921, 13446, 6723, 47060, 23530, 11765, 82354, 41177, 288238, 144119, 1008832, 504416, 252208, 126104, 63052, 31526, 15763, 110340, 55170, 27585, 193094, 96547 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Harry J. Smith, Table of n, a(n) for n=0..500

EXAMPLE

Since 3 is odd, the next term is 7 * 3 - 1 = 20.

And since 20 is even, the next term is 20/2 = 10.

MATHEMATICA

NestList[If[OddQ[#], 7# - 1, #/2] &, 3, 50] (* Harvey P. Dale, Aug 04 2011 *)

PROG

(PARI) { for (n=0, 50, if (n, if(a%2, a=7*a - 1, a/=2), a=3); print1(a, ", ") ) } \\ Harry J. Smith, Sep 01 2009

(Python)

def iter(n): return 7*n-1 if n%2 == 1 else n//2

def aupton(terms):

alst = [3]

for n in range(1, terms+1): alst.append(iter(alst[-1]))

return alst

print(aupton(42)) # Michael S. Branicky, Mar 20 2021

CROSSREFS

Cf. A287330, A037101.

Sequence in context: A013332 A223282 A223480 * A084316 A126810 A115280

Adjacent sequences: A063868 A063869 A063870 * A063872 A063873 A063874

KEYWORD

nonn,easy

AUTHOR

Jason Earls, Aug 27 2001

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Aug 29 2001

Title edited by Michael S. Branicky, Mar 20 2021

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 November 29 15:30 EST 2022. Contains 358431 sequences. (Running on oeis4.)