A290650 a(1) = 1. For n > 1, a(n) = a(n-1)/2 if a(n-1) is even, a(n) = a(n-1)*n otherwise.
1, 2, 1, 4, 2, 1, 7, 56, 28, 14, 7, 84, 42, 21, 315, 5040, 2520, 1260, 630, 315, 6615, 145530, 72765, 1746360, 873180, 436590, 218295, 6112260, 3056130, 1528065, 47370015, 1515840480, 757920240, 378960120
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
nxt[{n_,a_}]:={n+1,If[EvenQ[a],a/2,a(n+1)]}; NestList[nxt,{1,1},40][[All,2]] (* Harvey P. Dale, Dec 23 2020 *)
-
PARI
terms(n) = my(x=1, k=1, i=0); while(1, if(i==n, break, if(i==0, print1(x, ", "); k++; i++, if(x%2==0, x=x/2; k++, x=x*k; k++); print1(x, ", "); i++))) /* Print initial 40 terms as follows */ terms(40) \\ Felix Fröhlich, Aug 08 2017
Comments