Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Mar 19 2019 23:00:27
%S 2,5,13,17,23,31,37,43,47,61,67,73,79,89,103,107,109,113,137,149,151,
%T 163,167,179,181,193,197,223,227,233,241,251,257,263,269,271,277,281,
%U 307,317,347,349,353,359,379,383,389,397,419,421,431,433,449,457,463,467,487,499,503,509,521,523,547
%N Prime numbers in the lexicographically earliest sequence of positive integers whose prime indices are not already in the sequence (A304360).
%C Also primes whose prime index is not in A304360, or is in A324696. A prime index of n is a number m such that prime(m) divides n. - _Gus Wiseman_, Mar 19 2019
%H Robert Israel, <a href="/A317964/b317964.txt">Table of n, a(n) for n = 1..10000</a>
%p count:= 0:
%p P:= {}: A:= NULL:
%p for n from 2 while count < 100 do
%p pn:= numtheory:-factorset(n);
%p if pn intersect P = {} then
%p P:= P union {ithprime(n)};
%p if isprime(n) then A:= A, n; count:= count+1 fi;
%p fi
%p od:
%p A; # _Robert Israel_, Aug 26 2018
%t aQ[n_]:=n==1||Or@@Cases[FactorInteger[n],{p_,_}:>!aQ[PrimePi[p]]];
%t Prime[Select[Range[100],aQ]] (* _Gus Wiseman_, Mar 19 2019 *)
%Y Cf. A000720, A001462, A007097, A060197, A079254, A112798, A276625, A277098, A290822, A304360, A306844.
%Y Cf. A324695, A324698, A324704, A324741, A324756, A324758, A324765, A324766, A324768.
%K nonn
%O 1,1
%A _N. J. A. Sloane_, Aug 26 2018