OFFSET
1,1
COMMENTS
Also the number of squarefree numbers <= prime(n). - Gus Wiseman, Dec 08 2024
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
From Gus Wiseman, Dec 08 2024: (Start)
a(n) = A112929(n) + 1.
(End)
EXAMPLE
a(25)=61 because A005117(61) = prime(25) = 97.
From Gus Wiseman, Dec 08 2024: (Start)
The squarefree numbers up to prime(n) begin:
n = 1 2 3 4 5 6 7 8 9 10
----------------------------------
2 3 5 7 11 13 17 19 23 29
1 2 3 6 10 11 15 17 22 26
1 2 5 7 10 14 15 21 23
1 3 6 7 13 14 19 22
2 5 6 11 13 17 21
1 3 5 10 11 15 19
2 3 7 10 14 17
1 2 6 7 13 15
1 5 6 11 14
3 5 10 13
2 3 7 11
1 2 6 10
1 5 7
3 6
2 5
1 3
2
1
The column-lengths are a(n).
(End)
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
KEYWORD
nonn
AUTHOR
Labos Elemer, May 24 2002
STATUS
approved