OFFSET
0,2
COMMENTS
Set y = x = .5'i + .5'j + .5'k + .5e Define a(0) = 1 (this is twice the coefficient of the unit e in x), then "loop" steps 1-5, below. a(n) is given by twice the coefficient of e (the unit) in y from step 4 inside the n-th loop. Step 1 (Loop 1): Calculate x*y Result: x*y = .5'i + .5'j + .5'k - .5e Step 2 (Loop 1): Add the fractional parts of the real coefficient basis vectors of x*y (i.e. 'i, 'j, 'k, e) Result: .5 + .5 + .5 - .5 = 1 = s Step 3 (Loop 1): Calculate x + x*y + se Result .5'i + .5'j + .5'k + .5e + (.5'i + .5'j + .5'k - .5e) + se = 'i + 'j + 'k + e. Step 4 (Loop 1): Set y equal to the result from Step 3. Result: y = 'i + 'j + 'k + e; thus a(1) = 2*1 = 2 Step 5 (Loop 1): Return to Step 1 Step 1 (Loop 2): Result: x*y = 'i + 'j + 'k - e Step 2 (Loop 2): Result: s = 0 Step 3 (Loop 2): 1.5'i + 1.5'j + 1.5'k -.5e Step 4 (Loop 2): y = 1.5'i + 1.5'j + 1.5'k -.5e; thus a(2) = 2*(-.5) = -1 **Loop 1** + 'i + 'j + 'k + e **Loop 2** + 1.5'i + 1.5'j + 1.5'k - .5e **Loop 3** + 'i + 'j + 'k - e **Loop 4** + .5'i + .5'j + .5'k - 1.5e **Loop 5** - 3e **Loop 6** - 'i - 'j - 'k - 3e **Loop 7** - 1.5'i - 1.5'j - 1.5'k + .5e **Loop 8** + 2e **Loop 9** + 1.5'i + 1.5'j + 1.5'k + 1.5e **Loop 10** + 2'i + 2'j + 2'k **Loop 11** + 1.5'i + 1.5'j + 1.5'k - 2.5e **Loop 12** - 5e
Notice the horizontal line segments in the graph of (a(n)) against the natural numbers. These may be referred to as "Gerald's diamonds" (after Gerald McGarvey, who pointed them out shortly after this sequence was submitted). It could be an interesting task to find the approximate area of these diamonds and compare to the approximate area of the other diamonds.
From Benoit Jubin, Aug 12 2009: (Start)
Define the function f on the integers to be the odd function such that for n>=0, f(2n)=0 and f(2n+1)=1. Define the sequences a and b by
a(0)=b(0)=0,
a(n+1) = 1 + (a(n)-3b(n))/2 + f((a(n)-3b(n))/2) + 3 f((a(n)+b(n))/2),
b(n+1) = 1 + (a(n)+b(n))/2.
LINKS
Creighton Dement, Table of n, a(n) for n = 0..10000
Creighton Dement, Plot of A108618 against A108619 (patch on)
Creighton Dement, Plot of A108618 against A108619 (patch off)
Rémy Sigrist, Colored scatterplot of a(n) for n = 0..10000 (where the color is function of n mod 6)
MATHEMATICA
a[0] = b[0] = 0;
f[n_] := Sign[n]*Mod[n, 2];
a[n_] := a[n] = (1/2)*(a[n-1] - 3*b[n-1]) + 3*f[(1/2)*(a[n-1] + b[n-1])] + f[(1/2)*(a[n-1] - 3*b[n-1])] + 1;
b[n_] := b[n] = (1/2)*(a[n-1] + b[n-1]) + 1;
CROSSREFS
AUTHOR
Creighton Dement, Jun 12 2005
STATUS
approved