OFFSET
1,2
COMMENTS
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The sequence of runs of a sequence consists of its maximal consecutive constant subsequences when read left-to-right. For example, the runs of (2,2,1,1,1,3,2,2) are (2,2), (1,1,1), (3), (2,2), with sums (4,3,3,4).
EXAMPLE
The terms together with their prime indices begin:
1: {}
4: {1,1}
8: {1,1,1}
9: {2,2}
12: {1,1,2}
16: {1,1,1,1}
25: {3,3}
27: {2,2,2}
32: {1,1,1,1,1}
40: {1,1,1,3}
49: {4,4}
63: {2,2,4}
64: {1,1,1,1,1,1}
81: {2,2,2,2}
112: {1,1,1,1,4}
121: {5,5}
125: {3,3,3}
128: {1,1,1,1,1,1,1}
For example, 675 is in the sequence because its prime indices {2,2,2,3,3} have run-sums (6,6).
MATHEMATICA
Select[Range[100], !PrimeQ[#]&&SameQ@@Cases[FactorInteger[#], {p_, k_}:>PrimePi[p]*k]&]
PROG
(Python)
from itertools import count, islice
from sympy import factorint, primepi
def A353848_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n: n == 1 or (sum((f:=factorint(n)).values()) > 1 and len(set(primepi(p)*e for p, e in f.items())) <= 1), count(max(startvalue, 1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 26 2022
STATUS
approved