OFFSET
1,1
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
The sequence of terms together with their prime indices begins:
2: {1}
3: {2}
5: {3}
7: {4}
11: {5}
12: {1,1,2}
13: {6}
17: {7}
18: {1,2,2}
19: {8}
23: {9}
29: {10}
31: {11}
37: {12}
40: {1,1,1,3}
41: {13}
43: {14}
45: {2,2,3}
MAPLE
filter:= proc(n) local F, Inds, t;
if isprime(n) then return true fi;
F:= ifactors(n)[2];
Inds:= map(numtheory:-pi, F[.., 1]);
max(Inds) - min(Inds) = add(t[2], t=F) - nops(F)
end proc:
select(filter, [$2..300]); # Robert Israel, Nov 19 2023
MATHEMATICA
Select[Range[2, 100], With[{f=FactorInteger[#]}, PrimePi[f[[-1, 1]]]-PrimePi[f[[1, 1]]]==Total[Last/@f]-Length[f]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 06 2019
STATUS
approved