OFFSET
1,15
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Altug Alkan, Alternative Scatterplot of A284606
MAPLE
A005185:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc:
A004001:= proc(n) option remember; procname(procname(n-1)) +procname(n-procname(n-1)) end proc:
seq(A284606[i], i=1..1000); # Altug Alkan, Apr 01 2017
MATHEMATICA
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 *)
PROG
(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]))
CROSSREFS
KEYWORD
sign,look
AUTHOR
Altug Alkan, Mar 30 2017
STATUS
approved