cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A071403 Which squarefree number is prime? a(n)-th squarefree number equals n-th prime.

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