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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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

Views

Author

Labos Elemer, May 24 2002

Keywords

Comments

Also the number of squarefree numbers <= prime(n). - Gus Wiseman, Dec 08 2024

Examples

			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)
		

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.

Programs

  • Mathematica
    Position[Select[Range[300], SquareFreeQ], ?PrimeQ][[All, 1]] (* _Michael De Vlieger, Aug 17 2023 *)
  • 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

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(A008864(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)

A378616 Greatest non prime power <= prime(n).

Original entry on oeis.org

1, 1, 1, 6, 10, 12, 15, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 240, 250, 255, 262, 268, 270
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2024

Keywords

Comments

Conjecture: Equal to A006093(n) = prime(n) - 1 except at terms of A159611.

Examples

			The first number line below shows the non prime powers. The second shows the primes:
--1-------------6----------10----12----14-15-------18----20-21-22----24--
=====2==3====5=====7==========11====13==========17====19==========23=====
		

Crossrefs

For nonprime instead of non prime power we have A156037.
Restriction of A378367.
Lengths are A378615.
For nonsquarefree: A378032 (diffs A378034), restriction of A378033 (diffs A378036).
A000040 lists the primes, differences A001223
A000961 and A246655 list the prime powers, differences A057820.
A024619 lists the non prime powers, differences A375735, seconds A376599.
A080101 counts prime powers between primes (exclusive), inclusive A366833.
A361102 lists the non powers of primes, differences A375708.
Prime powers between primes:
- A377057 positive
- A377286 zero
- A377287 one
- A377288 two

Programs

  • Mathematica
    Table[Max[Select[Range[Prime[n]],Not@*PrimePowerQ]],{n,100}]
Showing 1-2 of 2 results.