OFFSET
0,2
MAPLE
N:= 100: # to get a(0) to a(N)
A[0]:= 1:
for n from 1 to N do
if A[n-1]::even then A[n]:= A[n-1]/2
else A[n]:= 23*A[n-1]+1
fi
od:
seq(A[i], i=0..N); # Robert Israel, Nov 21 2014
MATHEMATICA
NestList[If[OddQ[#], 23#+1, #/2]&, 1, 30] (* Harvey P. Dale, Sep 06 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved