OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ (6/Pi^2) * n log n. - Charles R Greathouse IV, Nov 27 2017
EXAMPLE
a(25)=61 because A005117(61) = prime(25) = 97.
MATHEMATICA
Position[Select[Range[300], SquareFreeQ], _?PrimeQ][[All, 1]] (* Michael De Vlieger, Aug 17 2023 *)
PROG
(PARI) lista(nn)=sqfs = select(n->issquarefree(n), vector(nn, i, i)); for (i = 1, #sqfs, if (isprime(sqfs[i]), print1(i, ", ")); ); \\ Michel Marcus, Sep 11 2013
(PARI) a(n, p=prime(n))=sum(k=1, sqrtint(p), p\k^2*moebius(k)) \\ Charles R Greathouse IV, Sep 13 2013
(PARI) a(n, p=prime(n))=my(s); forfactored(k=1, sqrtint(p), s+=p\k[1]^2*moebius(k)); s \\ Charles R Greathouse IV, Nov 27 2017
(PARI) first(n)=my(v=vector(n), pr, k); forsquarefree(m=1, n*logint(n, 2)+3, k++; if(m[2][, 2]==[1]~, v[pr++]=k; if(pr==n, return(v)))) \\ Charles R Greathouse IV, Jan 08 2018
(Python)
from math import isqrt
from sympy import prime, mobius
def A071403(n): return (p:=prime(n))+sum(mobius(k)*(p//k**2) for k in range(2, isqrt(p)+1)) # Chai Wah Wu, Jul 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 24 2002
STATUS
approved