login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #12 Dec 23 2020 15:00:52

%S 1,2,1,4,2,1,7,56,28,14,7,84,42,21,315,5040,2520,1260,630,315,6615,

%T 145530,72765,1746360,873180,436590,218295,6112260,3056130,1528065,

%U 47370015,1515840480,757920240,378960120

%N 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.

%C Conjecture: The sequence is unbounded. - _Felix Fröhlich_, Aug 08 2017

%H Harvey P. Dale, <a href="/A290650/b290650.txt">Table of n, a(n) for n = 1..1000</a>

%t 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 *)

%o (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++)))

%o /* Print initial 40 terms as follows */

%o terms(40) \\ _Felix Fröhlich_, Aug 08 2017

%K nonn

%O 1,2

%A _John Bailey_, Aug 08 2017