OFFSET
1,4
COMMENTS
Numbers n such that a(n) = 0 are 1, 2, 5, 8, 37, 99, 1580, 42029, ...
Sequence is a mixture of regularity and irregularity. - Douglas Hofstadter, Mar 03 2017
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10000
Altug Alkan, Alternative Graph of A283025
Altug Alkan, Illustration Of Residue Classes Modulo 4
EXAMPLE
a(4) = 3 since Sum_{k=1..4} A005185(k) = 1 + 1 + 2 + 3 = 7 and remainder when 7 is divided by 4 is 3.
MAPLE
A005185:= proc(n) option remember; procname(n-procname(n-1)) +procname(n-procname(n-2)) end proc:
L:= ListTools[PartialSums](map(A005185, [$1..1000])):
seq(L[i] mod i, i=1..1000); # Robert Israel, Feb 28 2017
MATHEMATICA
h[1]=h[2]=1; h[n_]:=h[n]= h[n-h[n-1]] + h[n-h[n-2]]; Mod[ Accumulate[h /@ Range[100]], Range[100]] (* Giovanni Resta, Feb 27 2017 *)
PROG
(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]) % n)
(PARI) first(n)=my(v=vector(n), s); v[1]=v[2]=1; for(k=3, n, v[k]=v[k-v[k-1]]+v[k-v[k-2]]); for(k=1, n, s+=v[k]; v[k]=s%k); v \\ after Charles R Greathouse IV at A282891
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Altug Alkan, Feb 27 2017
STATUS
approved