login
a(1) = 1 then a(n) = (-1)*Sum_{k=1..n-1} (-1)^a(k)*floor(n/k).
0

%I #14 Sep 15 2024 02:45:47

%S 1,2,2,1,3,3,5,7,8,8,8,8,8,8,8,9,11,11,13,15,17,17,19,21,24,22,20,20,

%T 20,18,18,20,18,18,20,19,21,23,23,27,29,31,33,35,35,37,39,43,46,44,44,

%U 42,42,40,40,40,40,38,38,36,36,34,34,35,37,37,39,41,43,43,45,49,51,53,53

%N a(1) = 1 then a(n) = (-1)*Sum_{k=1..n-1} (-1)^a(k)*floor(n/k).

%o (PARI)

%o N=100; an=vector(N);

%o an[1]=1; for(n=2, N, an[n]=-sum(k=1,n-1,(-1)^an[k]*floor(n/k)));

%o an

%K nonn

%O 1,2

%A _Benoit Cloitre_, Nov 10 2009