# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a284478 Showing 1-1 of 1 %I A284478 #17 Apr 03 2017 01:07:48 %S A284478 0,0,0,1,1,1,1,1,2,2,1,2,1,0,2,1,2,3,3,3,2,2,2,5,1,-1,1,2,1,0,4,1,1,4, %T A284478 5,3,3,4,3,4,5,5,5,3,1,3,4,8,-1,-1,2,1,0,0,0,-1,2,0,2,1,0,0,8,1,-1,6, %U A284478 3,1,7,7,3,4,6,5,6,5,8,5,4,5,7,7,4,8,3,7,6,4,7,9,2,0,3,2,2,18 %N A284478 a(n) = A005185(n) - A055748(n). %H A284478 Altug Alkan, Table of n, a(n) for n = 1..10000 %H A284478 Altug Alkan, Scatterplot of A284478 %e A284478 a(4) = 1 because a(4) = A005185(4) - A055748(4) = 3 - 2 = 1. %p A284478 A005185:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc: %p A284478 A005185(1):= 1: A005185(2):= 1: %p A284478 A055748:= proc(n) option remember; procname(procname(n-1)) +procname(n-procname(n-2)-1) end proc: %p A284478 A055748(1):= 1: A055748(2):= 1: %p A284478 A284478:= map(A005185 - A055748, [$1..1000]): %p A284478 A284478:= seq(A284478[i], i=1..1000); # _Altug Alkan_, Apr 01 2017 %t A284478 a[n_] := a[n] = If[n < 3, 1, a[n - a[n - 1]] + a[n - a[n - 2]]]; b[n_] := b[n] = If[n < 3, 1, b[b[n - 1]] + b[n - b[n - 2] - 1]]; Array[a[#] - b[#] &, 96] (* _Michael De Vlieger_, Mar 29 2017 *) %o A284478 (PARI) q=vector(1000); c=vector(1000); q[1]=q[2]=1; for(n=3, #q, q[n]=(q[n-q[n-1]]+q[n-q[n-2]])); c[1]=c[2]=1; for(n=3, #c, c[n]=(c[c[n-1]]+c[n-c[n-2]-1])); va = vector(1000, n, q[n]-c[n]) %Y A284478 Cf. A005185, A055748. %K A284478 sign,look %O A284478 1,9 %A A284478 _Altug Alkan_, Mar 27 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE