Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Apr 03 2017 01:08:09
%S 0,0,0,-1,0,0,1,-1,1,0,-1,-1,0,0,2,-1,1,-1,0,0,0,1,-2,-2,-1,1,1,0,0,0,
%T 4,-1,0,-2,2,1,-1,-1,-1,1,-1,1,-1,2,-2,3,-3,-5,-4,4,1,2,-4,0,-1,3,1,1,
%U 0,0,0,0,8,-1,-2,-4,0,3,2,-2,-1,1,0,2,-2,3,-1,4,-4
%N a(n) = (-1)^n * A284019(n).
%H Altug Alkan, <a href="/A284606/b284606.txt">Table of n, a(n) for n = 1..10000</a>
%H Altug Alkan, <a href="/A284606/a284606.png">Alternative Scatterplot of A284606</a>
%F a(n) = (-1)^n * (A004001(n) - A005185(n)).
%e a(4) = -1 since a(4) = (-1)^4 * (A004001(4) - A005185(4)) = 2 - 3 = -1
%p A005185:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc:
%p A005185(1):= 1: A005185(2):= 1:
%p A004001:= proc(n) option remember; procname(procname(n-1)) +procname(n-procname(n-1)) end proc:
%p A004001(1):= 1: A004001(2):= 1:
%p A284606:= map((-1)^i * (A004001 - A005185), [$1..1000]):
%p seq(A284606[i], i=1..1000); # _Altug Alkan_, Apr 01 2017
%t a[n_] := a[n] = If[n <= 2, 1, a[a[n - 1]] + a[n - a[n - 1]]]; b[1] = b[2] = 1; b[n_] := b[n] = b[n - b[n - 1]] + b[n - b[n - 2]]; Table[(-1)^n*(a@ n - b@ n), {n, 87}] (* _Michael De Vlieger_, Apr 02 2017, after _Robert G. Wilson v_ at A004001 *)
%o (PARI) q=vector(10000); h=vector(10000); q[1]=q[2]=1; for(n=3, #q, q[n]=q[n-q[n-1]]+q[n-q[n-2]]); h[1]=h[2]=1; for(n=3, #h, h[n]=h[h[n-1]]+h[n-h[n-1]]); vector(10000, n, (-1)^n*(h[n]-q[n]))
%Y Cf. A004001, A005185, A284019.
%K sign,look
%O 1,15
%A _Altug Alkan_, Mar 30 2017