|
|
A166242
|
|
Sequence generated from A014577, the dragon curve.
|
|
6
|
|
|
1, 2, 4, 2, 4, 8, 4, 2, 4, 8, 16, 8, 4, 8, 4, 2, 4, 8, 16, 8, 16, 32, 16, 8, 4, 8, 16, 8, 4, 8, 4, 2, 4, 8, 16, 8, 16, 32, 16, 8, 16, 32, 64, 32, 16, 32, 16, 8, 4, 8, 16, 8, 16, 32, 16, 8, 4, 8, 16, 8, 4, 8, 4, 2, 4, 8, 16, 8, 16, 32, 16, 8, 16, 32, 64, 32, 16, 32, 16, 8, 16, 32, 64, 32, 64, 128, 64, 32, 16, 32
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
-1,2
|
|
COMMENTS
|
Rows of A164281 tend to A166242. Subsets of the first 2^n terms can be parsed into a binomial frequency of powers of 2; for example, the first 16 terms has as frequency of (1, 4, 6, 4, 1): (one 1, four 2's, six 4's, four 8's, and one 16.).
|
|
LINKS
|
|
|
FORMULA
|
Let a(-1) = 1, then a(n+1) = 2*a(n) if A014577(n+1) = 1. If A014577(n+1) = 0, then a(n+1) = (1/2)*a(n).
As a recursive string in subsets of 2^n terms, the next subset = twice each term of current string, reversed, and appended.
|
|
EXAMPLE
|
...1...1...0...1...1...0...0...1... generates A166242:
1..2...4...2...4...8...4...2...4... given A166242(-1)=1.
By recursion, given the first four terms: (1, 2, 4, 2); reverse, double, and append to (1, 2, 4, 2) getting (1, 2, 4, 2, 4, 8, 4, 2,...).
|
|
MATHEMATICA
|
|
|
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)))
;; Scheme-code for A000035 and A000265 given under respective entries.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|