login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037101 Trajectory of 3 under map n->7n+1 if n odd, n->n/2 if n even. 2
3, 22, 11, 78, 39, 274, 137, 960, 480, 240, 120, 60, 30, 15, 106, 53, 372, 186, 93, 652, 326, 163, 1142, 571, 3998, 1999, 13994, 6997, 48980, 24490, 12245, 85716, 42858, 21429, 150004, 75002, 37501, 262508, 131254, 65627, 459390, 229695, 1607866, 803933 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

MAPLE

a:= proc(n) option remember; local v;

  v:= procname(n-1);

  if v::odd then 7*v+1 else v/2 fi

end proc:

a(0):= 3:

map(a, [$0..100]); # Robert Israel, Jan 24 2020

MATHEMATICA

nxt[n_]:=If[OddQ[n], 7n+1, n/2]; NestList[nxt, 3, 40] (* Harvey P. Dale, Jun 05 2012 *)

PROG

(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(43)) # Michael S. Branicky, Mar 22 2021

CROSSREFS

Cf. A063871.

Sequence in context: A161377 A122495 A100977 * A226028 A248626 A072398

Adjacent sequences:  A037098 A037099 A037100 * A037102 A037103 A037104

KEYWORD

nonn

AUTHOR

N. J. A. Sloane.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 01:36 EDT 2021. Contains 343117 sequences. (Running on oeis4.)