|
|
A099545
|
|
Odd part of n, modulo 4.
|
|
15
|
|
|
1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 3, 3, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 3, 3, 1, 3, 3, 1, 1, 1, 3, 1, 1, 3, 3, 3, 1, 1, 3, 3, 1, 3, 3, 3, 1, 1, 3, 1, 1, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Fractal sequence: odd terms are 1, 3, 1, 3,...; the even terms are the sequence itself: a(n)=a(2n)=a(4n)=a(8n)=a(16n)=... - Alexandre Wajnberg, Jan 02 2006
Has the same structure as the regular paper-folding (dragon curve) sequence (A014577, A014709). We can interpret a(n) as the number of 90-degree rotations to make in a single direction at the n-th "turn" in the dragon curve. After all, making three 90-degree rotations to the left (turning a total of 270 degrees) is equivalent to making one 90-degree rotation to the right, and vice versa.
We can likewise produce the dragon curve by interpreting A000265(n), the whole odd part of n, as the number of 90-degree rotations to make in a single direction at the n-th "turn" in the curve. (End)
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(100)=1: the odd part of 100 is 100/4 = 25, and 25 % 4 =1.
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) a(n)=bitand(n/(2^valuation(n, 2)), 3); /* Joerg Arndt, Jul 18 2012 */
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|