OFFSET
1,2
COMMENTS
We consider 1 to be a power of a prime and a non-prime-power, but not a prime-power.
A run of a sequence (in this case A000961) is an interval of positions at which consecutive terms differ by one.
The last element of the same run is A373677.
Consists of 1 and all non-prime-powers k such that k-1 is a power of a prime.
LINKS
EXAMPLE
The maximal runs of non-prime-powers begin:
1
6
10
12
14 15
18
20 21 22
24
26
28
30
33 34 35 36
38 39 40
42
44 45 46
48
50 51 52
54 55 56 57 58
60
MATHEMATICA
Select[Range[100], #==1||!PrimePowerQ[#]&&PrimePowerQ[#-1]&]
CROSSREFS
See link for prime, composite, squarefree, and nonsquarefree runs/antiruns.
For runs of powers of primes:
- length A174965
- min A373673
- max A373674
- sum A373675
For runs of non-prime-powers:
- min A373676 (this sequence)
- max A373677
- sum A373678
For antiruns of prime-powers:
- length A373671
- min A120430
- max A006549
- sum A373576
For antiruns of non-prime-powers:
- length A373672
- min A373575
- max A255346
- sum A373679
A025528 counts prime-powers up to n.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 16 2024
STATUS
approved