

A309878


The real part of b(n) where b(n) = (n + b(n1)) * (1 + i) with b(1)=0; i = sqrt(1).


0



0, 1, 2, 1, 4, 13, 22, 23, 8, 23, 54, 53, 12, 141, 270, 271, 16, 495, 1006, 1005, 20, 2069, 4118, 4119, 24, 8167, 16358, 16357, 28, 32797, 65566, 65567, 32, 131039, 262110, 262109, 36, 524325, 1048614, 1048615, 40, 2097111, 4194262, 4194261, 44
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Observe that (starting with n=1) the sequence has a pattern of a cluster of 3 positive numbers followed by a cluster of 5 negative numbers.
Observe also if the clusters of 3 positive numbers are represented by x, y, z; then y = (x * 2) + (8 * k) where k a positive integer ; when this happens, k = (n  1) / 8 ; therefore y = x * 2 + n  1; z = y  1
Observe also that within each cluster of 5 negative numbers, the first and last are orders of magnitude less than the middle 3 values. The first and last always differ by 4 and are always equal to n.
Observe also if the clusters of 5 negative numbers are represented by c, d, e, f, g ; then d  c = e  d; f = e  1; g = c  4


LINKS



FORMULA

G.f.: x*(1  2*x) / ((1  x)^2*(1  2*x + 2*x^2)).
a(n) = 4*a(n1)  7*a(n2) + 6*a(n3)  2*a(n4) for n>3.
a(n) = i*((1i)^n  (1+i)^n + i*n) where i=sqrt(1).
(End)


EXAMPLE

For n = 1; b(n) = 0
For n = 0; b(n) = (0+0)*(1+i) = 0
For n = 1; b(n) = (1+0)*(1+i) = 1+i ; a(1) = Re(1+i) = 1
For n = 2; b(n) = (2+1+i)*(1+i) = (3+i)*(1+i) = 3+i+3i1 = 2+4i ; a(2) = Re(2+4i) = 2
For n = 3; b(n) = 1+9i ; a(3) = 1
For n = 4; b(n) = 4+14i ; a(4) = 4
For n = 5; b(n) = 13+15i ; a(5) = 13
For n = 6; b(n) = 22+8i ; a(6) = 22
For n = 7; b(n) = 237i ; a(7) = 23
...
For n = 31; b(n) = 6556765503i ; a(31) = 65567
For n = 32; b(n) = (326556765503i)*(1+i) = (6553565503i)*(1+i) = 6553565503i65535i+65503 = 32131038i ; a(32) = 32
For n = 33; b(n) = 131039131037i ; a(33) = 131039


PROG

(PARI) b(n) = if (n==0, 0, (n + b(n1)) * (1 + I));
for (n=0, 50, print1(real(b(n)), ", ")) \\ Michel Marcus, Aug 21 2019


CROSSREFS



KEYWORD

sign,easy


AUTHOR



STATUS

approved



