login
A071403
Which squarefree number is prime? a(n)-th squarefree number equals n-th prime.
11
2, 3, 4, 6, 8, 9, 12, 13, 16, 18, 20, 24, 27, 29, 31, 33, 37, 38, 42, 45, 46, 50, 52, 56, 61, 62, 64, 67, 68, 71, 78, 81, 84, 86, 92, 93, 96, 100, 103, 105, 109, 110, 117, 118, 121, 122, 130, 139, 141, 142, 145, 149, 150, 154, 158, 162, 166, 167, 170, 172, 174, 180
OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
A005117(a(n)) = A000040(n) = prime(n).
a(n) ~ (6/Pi^2) * n log n. - Charles R Greathouse IV, Nov 27 2017
a(n) = A013928(A000040(n)). - Ridouane Oudra, Oct 15 2019
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