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”).
%I #31 Dec 09 2024 19:45:16
%S 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,
%T 62,64,67,68,71,78,81,84,86,92,93,96,100,103,105,109,110,117,118,121,
%U 122,130,139,141,142,145,149,150,154,158,162,166,167,170,172,174,180
%N Which squarefree number is prime? a(n)-th squarefree number equals n-th prime.
%C Also the number of squarefree numbers <= prime(n). - _Gus Wiseman_, Dec 08 2024
%H Charles R Greathouse IV, <a href="/A071403/b071403.txt">Table of n, a(n) for n = 1..10000</a>
%F A005117(a(n)) = A000040(n) = prime(n).
%F a(n) ~ (6/Pi^2) * n log n. - _Charles R Greathouse IV_, Nov 27 2017
%F a(n) = A013928(A000040(n)). - _Ridouane Oudra_, Oct 15 2019
%F From _Gus Wiseman_, Dec 08 2024: (Start)
%F a(n) = A112929(n) + 1.
%F a(n+1) - a(n) = A373198(n) = A061398(n) - 1.
%F (End)
%e a(25)=61 because A005117(61) = prime(25) = 97.
%e From _Gus Wiseman_, Dec 08 2024: (Start)
%e The squarefree numbers up to prime(n) begin:
%e n = 1 2 3 4 5 6 7 8 9 10
%e ----------------------------------
%e 2 3 5 7 11 13 17 19 23 29
%e 1 2 3 6 10 11 15 17 22 26
%e 1 2 5 7 10 14 15 21 23
%e 1 3 6 7 13 14 19 22
%e 2 5 6 11 13 17 21
%e 1 3 5 10 11 15 19
%e 2 3 7 10 14 17
%e 1 2 6 7 13 15
%e 1 5 6 11 14
%e 3 5 10 13
%e 2 3 7 11
%e 1 2 6 10
%e 1 5 7
%e 3 6
%e 2 5
%e 1 3
%e 2
%e 1
%e The column-lengths are a(n).
%e (End)
%t Position[Select[Range[300], SquareFreeQ], _?PrimeQ][[All, 1]] (* _Michael De Vlieger_, Aug 17 2023 *)
%o (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
%o (PARI) a(n,p=prime(n))=sum(k=1, sqrtint(p), p\k^2*moebius(k)) \\ _Charles R Greathouse IV_, Sep 13 2013
%o (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
%o (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
%o (Python)
%o from math import isqrt
%o from sympy import prime, mobius
%o 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
%Y Cf. A000290, A013928.
%Y The strict version is A112929.
%Y A000040 lists the primes, differences A001223, seconds A036263.
%Y A005117 lists the squarefree numbers, differences A076259.
%Y A013929 lists the nonsquarefree numbers, differences A078147.
%Y A070321 gives the greatest squarefree number up to n.
%Y Other families: A014689, A027883, A378615, A065890.
%Y Squarefree numbers between primes: A061398, A068360, A373197, A373198, A377430, A112925, A112926.
%Y Nonsquarefree numbers: A057627, A378086, A061399, A068361, A120327, A377783, A378032, A378033.
%Y Cf. A046933, A049093, A053797, A072284, A077641, A224363, A337030, A345531.
%K nonn,changed
%O 1,1
%A _Labos Elemer_, May 24 2002