OFFSET
2,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..100
EXAMPLE
The third differences of the composite numbers are:
-1, 1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -2, 1, 0, 0, 1, -1, -1, ...
so a(3) = 14.
MATHEMATICA
nn=10000;
u=Table[Differences[Select[Range[nn], CompositeQ], 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
The version for prime instead of composite is A376678.
For noncomposite numbers we have A376855.
This is the first position of 0 in row n of the array A377033.
For prime-power instead of composite we have A377055.
Other arrays of differences: A095195 (prime), A376682 (noncomposite), A377033 (composite), A377038 (squarefree), A377046 (nonsquarefree), A377051 (prime-power).
A377036 gives first term of the n-th differences of the composite numbers, for primes A007442 or A030016.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 17 2024
EXTENSIONS
Offset 2 from Michel Marcus, Oct 18 2024
a(17)-a(54) from Alois P. Heinz, Oct 18 2024
STATUS
approved