login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A071403
Which squarefree number is prime? a(n)-th squarefree number equals n-th prime.
24
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
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
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
From Gus Wiseman, Dec 08 2024: (Start)
a(n) = A112929(n) + 1.
a(n+1) - a(n) = A373198(n) = A061398(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
CROSSREFS
The strict version is A112929.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, differences A076259.
A013929 lists the nonsquarefree numbers, differences A078147.
A070321 gives the greatest squarefree number up to n.
Other families: A014689, A027883, A378615, A065890.
Squarefree numbers between primes: A061398, A068360, A373197, A373198, A377430, A112925, A112926.
Nonsquarefree numbers: A057627, A378086, A061399, A068361, A120327, A377783, A378032, A378033.
Sequence in context: A010385 A095037 A191284 * A010407 A035240 A278580
KEYWORD
nonn
AUTHOR
Labos Elemer, May 24 2002
STATUS
approved