login
A277778
If n is even, a(n) = a(n/2-1), and if n is odd, a(n) = a((n-1)/2) - a((n+1)/2), with a(1) = a(2) = 1.
2
1, 1, 0, 1, 1, 1, -1, 0, 0, 1, 0, 1, 2, 1, -1, -1, 0, 0, -1, 0, 1, 1, -1, 0, -1, 1, 1, 2, 2, 1, 0, -1, -1, -1, 0, 0, 1, 0, -1, -1, -1, 0, 0, 1, 2, 1, -1, -1, 1, 0, -2, -1, 0, 1, -1, 1, 0, 2, 1, 2, 1, 1, 1, 0, 0, -1, 0, -1, -1, -1, 0, 0, -1, 0, 1, 1, 1, 0, 0
OFFSET
1,13
COMMENTS
This sequence grows very slowly, in both positive and negative directions. The first 3 in the list is a(221), the first 12 is a(122333), and the first -13 is a(980851).
First occurrences: a(1) = 1, a(3) = 0, a(7) = -1, a(13) = 2, a(51) = -2, a(221) = 3, a(477) = 4, a(845) = -3, a(1907) = -4, a(3549) = 5, a(7389) = 6, a(7645) = 7, a(13533) = -5, a(27101) = -6, a(30579) = -7, a(56797) = 8, a(61157) = 9, a(117981) = 10, a(122333) = 12, a(216541) = -9, a(216805) = -8, a(236509) = 11, a(245213) = 13, a(433629) = -11, a(471923) = -10, a(489331) = -12, a(978533) = 14, a(978661) = 15, a(980851) = -13, a(1818077) = 16, a(1887709) = 17, a(1957341) = 20, a(3464669) = -15, a(3469029) = -14, a(3755485) = -16, a(3775453) = 18, a(3914701) = 19, a(3914717) = 21, a(3915229) = 22, a(3923421) = 23, a(6938077) = -19, a(7511517) = -17, a(7773661) = -18, a(7829363) = -20, a(15658725) = 25, a(15658867) = -21, a(15660915) = -22, a(15693683) = -23, a(28949981) = 24, a(29089245) = 28, a(29220317) = 27, a(30199005) = 26, a(30203357) = 29, a(31313117) = 30, a(31317469) = 33. - Charles R Greathouse IV, Oct 30 2016
From Robert Israel, Nov 10 2016: (Start)
a(2^k-2) = 1.
a(2^k-1) = A010892(k).
a(2^k) = A010892(k-1).
a(13*(16^k-1)/15) = A000045(k+2) for k >= 1.
Using this, there is c>0 such that a(n) > c n^d for infinitely many n, where d = log_16((1+sqrt(5))/2) = 0.1735604784...
(End)
LINKS
FORMULA
G.f. satisfies A(x) = (x^2 + x - 1/x) * A(x^2) + 2*x + x^2. - Andrey Zabolotskiy, Oct 30 2016
|a(n)| << n^0.71. - Charles R Greathouse IV, Nov 01 2016
EXAMPLE
The first two terms are a(1) = a(2) = 1. To get the next two terms, subtract the second from the first to get a(3) = a(1) - a(2) = 0 and copy the first term as a(4) = a(1) = 1.
To find a(5) and a(6), start over using a(2) and a(3); then for a(7) and a(8), use a(3) and a(4); and so on.
MAPLE
N:= 200: # to get a(1) .. a(N)
A[1]:= 1: A[2]:= 1:
for j from 1 to (N-1)/2 do
A[2*j+1]:= A[j] - A[j+1];
A[2*j+2]:= A[j];
od:
seq(A[i], i=1..N); # Robert Israel, Nov 10 2016
MATHEMATICA
a[n_] := a[n] = If[ OddQ[n], a[(n - 1)/2] - a[(n + 1)/2], a[n/2 - 1]]; a[1] = a[2] = 1; Array[a, 100] (* Robert G. Wilson v, Nov 11 2016 *)
PROG
(PARI) a(n)=if(n<7, return(n!=3)); if(n%2, a(n\2) - a(n\2+1), a(n/2-1)) \\ Charles R Greathouse IV, Oct 30 2016
CROSSREFS
KEYWORD
sign
AUTHOR
Tristan Cam, Oct 30 2016
STATUS
approved