login
a(n) = A054978(n)/2 if that number is 0 or 1, otherwise -1.
5

%I #15 May 10 2023 22:40:40

%S 1,1,0,0,0,1,1,1,0,0,0,1,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,1,0,0,1,1,1,0,

%T 1,1,0,1,1,0,1,0,0,1,1,1,1,0,0,1,1,0,1,1,0,1,0,1,0,1,1,1,1,0,1,0,1,1,

%U 1,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,0,1,0,0,0,1,0,1,1,0,1,0,1,1

%N a(n) = A054978(n)/2 if that number is 0 or 1, otherwise -1.

%C Conjectured to be always 0 or 1.

%H Paolo Xausa, <a href="/A362460/b362460.txt">Table of n, a(n) for n = 1..20000</a> (terms 1..1000 from N. J. A. Sloane)

%t A000959[upto_]:=Module[{s=2,a=Range[1,upto,2]},While[s<Length[a]&&a[[s]]<=Length[a],a=Drop[a,{a[[s]],-1,a[[s++]]}]];a];

%t A362460[upto_]:=Module[{d=A000959[upto],f},Table[If[(f=First[d=Abs[Differences[d]]])==0||f==2,f/2,-1],Length[d]-1]];

%t A362460[1000] (* Uses lucky numbers up to 1000 *) (* _Paolo Xausa_, May 10 2023 *)

%Y Cf. A000939, A054978, A362451.

%K nonn

%O 1

%A _N. J. A. Sloane_, May 07 2023