OFFSET
1,2
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, C program
MATHEMATICA
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];
A362462[upto_]:=Module[{d=A000959[upto]}, Table[If[First[d=Abs[Differences[d]]]==2, n, Nothing], {n, Length[d]-1}]];
A362462[2000] (* Uses lucky numbers up to 2000 *) (* Paolo Xausa, May 11 2023 *)
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 07 2023
STATUS
approved