OFFSET
1,2
EXAMPLE
The prime-powers inclusive (A000961) are:
1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, ...
with first differences (A057820):
1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, ...
with first differences (A376596):
0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
with first appearances (A376653):
1, 4, 5, 10, 12, 18, 25, 45, 47, 48, 60, 68, 69, 71, 80, 118, 121, 178, 179, 199, ...
MATHEMATICA
q=Differences[Select[Range[100], #==1||PrimePowerQ[#]&], 2];
Select[Range[Length[q]], !MemberQ[Take[q, #-1], q[[#]]]&]
CROSSREFS
These are the sorted positions of first appearances in A376596.
The exclusive version is a(n) - 1 = A376654(n), except first term.
For squarefree instead of prime-power we have A376655.
A064113 lists positions of adjacent equal prime gaps.
For prime-powers inclusive: A057820 (first differences), A376597 (inflections and undulations), A376598 (nonzero curvature).
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 06 2024
STATUS
approved