login
The OEIS is supported by the many generous donors to the OEIS 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
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: A122495 A100977 A364163 * A226028 A248626 A360366
KEYWORD
nonn
AUTHOR
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 April 19 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)