%I #27 Mar 23 2017 10:08:17
%S 0,0,0,0,1,2,3,5,7,9,1,2,4,7,9,12,15,0,3,6,9,12,17,20,0,4,8,12,16,22,
%T 26,31,4,9,14,20,26,31,37,3,8,14,20,26,32,38,1,4,11,18,23,30,39,46,53,
%U 6,12,20,28,36,44,56,1,9,21,28,36,46,57,68,9,20,30,39,48,60,69,2,12
%N a(n) = (Sum_{k=1..n} q(k+1-q(k))) mod n where q(k) = A005185(k).
%C Sequence represents d(n, 1, 1) where d(n, i, j) = (Sum_{k=1..n} q(k+j-q(k))) mod (n*i) where q(k) = A005185(k).
%H Altug Alkan, <a href="/A284173/b284173.txt">Table of n, a(n) for n = 1..10000</a>
%H Robert Israel, <a href="/A284173/a284173_1.png">Illustration Of Residue Classes Modulo 8</a>
%F a(n) = A280706(n) mod n. - _Antti Karttunen_, Mar 22 2017
%p N:= 1000: # to get a(1) to a(N)
%p B[1]:= 1:
%p B[2]:= 1:
%p for n from 3 to N do
%p B[n]:= B[n-B[n-1]] + B[n-B[n-2]];
%p od:
%p seq(add(B[k+1-B[k]], k=1..n) mod n, n=1..N); # _Robert Israel_, Mar 22 2017
%t q[n_]:=If[n<3, 1, q[n - q[n - 1]] + q[n - q[n - 2]]]; a[n_]:=Mod[Sum[q[k + 1 - q[k]],{k, n}], n]; Table[a[n], {n, 100}] (* _Indranil Ghosh_, Mar 21 2017 *)
%o (PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n]=a[n-a[n-1]]+a[n-a[n-2]]); vector(#a, n, sum(k=1, n, a[k+1-a[k]]) % n)
%o (Scheme) (define (A284173 n) (modulo (A280706 n) n)) ;; Other code as in A280706, A283467 and A005185 - _Antti Karttunen_, Mar 22 2017
%Y Cf. A005185, A280706, A283025, A283467, A283509.
%K nonn
%O 1,6
%A _Altug Alkan_, Mar 21 2017