OFFSET
0,1
COMMENTS
Starting with 11 leads to 7 after 4 steps (11 -> 56 -> 28 -> 14 -> 7) and therefore essentially the same orbit, cf. A259193. - There is a different notion of "5x+1" map and related sequences, where not only factors of 2, but also factors of 3 are divided out, cf. A057688. - M. F. Hasler, Apr 06 2026
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
a(0) = 7; a(n) = 5*a(n-1) + 1 if a(n-1) is odd, a(n) = a(n-1)/2 otherwise.
a(n) = A259193(n+4) for all n >= 0. - M. F. Hasler, Apr 06 2026
MAPLE
f := proc(n) option remember; if n = 0 then 7 elif f(n-1) mod 2 = 0 then f(n-1)/2 else 5*f(n-1)+1; fi; end; seq(f(n), n=0..50);
MATHEMATICA
a[0] = 7; a[n_] := a[n] = If[OddQ[a[n-1]], 5 a[n-1] + 1, a[n-1]/2];
a /@ Range[0, 50] (* Jean-François Alcover, Nov 03 2020 *)
NestList[If[OddQ[#], 5#+1, #/2]&, 7, 50] (* Harvey P. Dale, Nov 03 2022 *)
PROG
(PARI) A028389_first(N)=vector(N, i, N=if(i==1, 7, N%2, N*5+1, N/2)) \\ M. F. Hasler, Apr 06 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Named edited by Andrew Howroyd, Aug 21 2020
STATUS
approved
