OFFSET
1,2
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
N. Fernandez, An order of primeness, F(p)
N. Fernandez, An order of primeness [cached copy, included at A006450 with permission of the author]
EXAMPLE
182 is in the sequence because its prime factors 2, 7, 13 all have order of primeness 1.
MAPLE
with(numtheory):
p:= proc(n) option remember;
`if`(isprime(n), 1+p(pi(n)), 0)
end:
a:= proc(n) option remember; local k; for k from 1+`if`(n=1,
0, a(n-1)) while nops(map(p, factorset(k)))>1 do od; k
end:
seq(a(n), n=1..100); # Alois P. Heinz, Nov 24 2018
MATHEMATICA
ordpri[n_]:=If[!PrimeQ[n], 0, Length[NestWhileList[PrimePi, PrimePi[n], PrimeQ]]];
Select[Range[200], SameQ@@ordpri/@FactorInteger[#][[All, 1]]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 24 2018
STATUS
approved