OFFSET
-1,2
COMMENTS
LINKS
FORMULA
EXAMPLE
MATHEMATICA
FoldList[If[EvenQ[((#2 + 1)/2^IntegerExponent[#2 + 1, 2] - 1)/2], 2 #1, #1/2] &, 1, Range[0, 89]] (* Michael De Vlieger, Jul 29 2017, after Jean-François Alcover at A014577 *)
PROG
(Scheme, with memoization-macro definec)
;; Because definec does not work well with offset -1, we define an offset-0 based version of recurrence:
(definec (A166242off0 n) (if (zero? n) 1 (* (expt 2 (- (* 2 (A014577 (- n 1))) 1)) (A166242off0 (- n 1)))))
;; which the offset -1 version will invoke:
(define (A166242 n) (A166242off0 (+ 1 n)))
;; Antti Karttunen, Jul 27 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Oct 10 2009
EXTENSIONS
More terms from Antti Karttunen, Jul 27 2017
STATUS
approved