OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4)=22 because A078142(22)=7, the fourth prime and this is the first time 7 occurs.
MATHEMATICA
s[n_] := Total[Ceiling[Sqrt[(p = FactorInteger[n][[;; , 1]])]]^2 - p]; max=45; seq=Table[0, {max}]; c = 0; n=1; While[c<max, s1=s[n]; If[PrimeQ[s1], i=PrimePi[s1]; If[i<=max && seq[[i]]==0, c++; seq[[i]] = n]]; n++]; seq (* Amiram Eldar, Dec 08 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Nov 20 2002
STATUS
approved