OFFSET
0,4
LINKS
Lucas A. Brown, Python program.
EXAMPLE
The third differences of the noncomposite numbers begin: 1, -1, 2, -4, 4, -4, 4, 0, -6, 8, ... so a(3) = 8.
MATHEMATICA
nn=10000;
u=Table[Differences[Select[Range[nn], #==1||PrimeQ[#]&], k], {k, 2, 16}];
mnrm[s_]:=If[Min@@s==1, mnrm[DeleteCases[s-1, 0]]+1, 0];
m=Table[Position[u[[k]], 0][[1, 1]], {k, mnrm[Union[First/@Position[u, 0]]]}]
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Gus Wiseman, Oct 15 2024
EXTENSIONS
a(16)-a(21) from Alois P. Heinz, Oct 18 2024
a(22)-a(35) from Lucas A. Brown, Nov 03 2024
STATUS
approved