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-3 of 3 results.

A057809 Numbers k such that pi(k) divides k.

Original entry on oeis.org

2, 4, 6, 8, 27, 30, 33, 96, 100, 120, 330, 335, 340, 350, 355, 360, 1008, 1080, 1092, 1116, 1122, 1128, 1134, 3059, 3066, 3073, 3080, 3087, 3094, 8408, 8424, 8440, 8456, 8464, 8472, 23526, 23535, 24300, 64540, 64580, 64610, 64620, 64650, 64690, 64700
Offset: 1

Views

Author

N. J. A. Sloane, Nov 07 2000

Keywords

Comments

Each cluster of entries is approximately a power of e times larger than the previous cluster.
The sequence is infinite (Golomb, 1962). - Yifan Xie, Jun 23 2025

Examples

			120 is a member as there are exactly 30 primes less than 120 and 30 * 4 = 120.
		

Crossrefs

Apart from initial term same as A058011.

Programs

  • Magma
    [n: n in [2..10^5] | n mod #PrimesUpTo(n) eq 0]; // Vincenzo Librandi, Jul 04 2016
  • Maple
    select(t -> t mod numtheory:-pi(t) = 0, [$2..10^5]); # Robert Israel, Jul 03 2016
  • Mathematica
    Select[ Range[2, 10^5], IntegerQ[ # / PrimePi[ # ]] & ]
    Select[Range[1000], Divisible[#, PrimePi[#]] &] (* Requires version 6.0+. Alonso del Arte, May 24 2015 *)
  • PARI
    is(n)=n%primepi(n)==0 \\ Charles R Greathouse IV, Sep 14 2015
    

Extensions

More terms from James Sellers, Nov 08 2000
a(297)-a(1161) obtained from the values of A038625 computed by Jan Büthe. - Giovanni Resta, Aug 31 2018

A065134 Remainder when n is divided by the number of primes not exceeding n.

Original entry on oeis.org

0, 1, 0, 2, 0, 3, 0, 1, 2, 1, 2, 1, 2, 3, 4, 3, 4, 3, 4, 5, 6, 5, 6, 7, 8, 0, 1, 9, 0, 9, 10, 0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9, 10, 8, 9, 7, 8, 9, 10, 11, 12, 10, 11, 12, 13, 11, 12, 10, 11, 12, 13, 14, 15, 13, 14, 15, 16, 14, 15, 16, 17, 18, 19, 17, 18, 19
Offset: 2

Views

Author

Labos Elemer, Oct 15 2001

Keywords

Comments

Also remainder when the number of nonprimes is divided by the number of primes (not exceeding n).

Examples

			n = 2: Pi[2] = 1,Mod[1,1] = 0, the first term = a(2) = 0; n = 100: Pi[100] = 25, Mod[100,25] = 0 = a(100); n = 20: Pi[20] = 8, Mod[20,8] = 4 = a(20).
		

Crossrefs

Programs

  • Mathematica
    Table[Last@ QuotientRemainder[n, PrimePi[n]], {n, 2, 91}] (* Michael De Vlieger, Jul 04 2016 *)
  • PARI
    { for (n=2, 1000, write("b065134.txt", n, " ", n%primepi(n)) ) } \\ Harry J. Smith, Oct 11 2009

Formula

a(n) = n (mod pi(n)).

Extensions

Term a(1) removed so OFFSET changed from 1,5 to 2,4 by Harry J. Smith, Oct 11 2009
Since OFFSET is 2,4; Term a(1) removed and a(91) added by Harry J. Smith, Oct 11 2009

A256394 Prime values of pi(n) that divide n.

Original entry on oeis.org

2, 3, 11, 67, 71, 439, 1051, 6469, 40087, 100361, 100363, 251737, 251761, 637319, 637327, 4124459, 10553513, 10553551, 27067277, 69709733, 179993171, 465769817, 3140421769, 8179002109, 8179002133, 55762149029, 55762149071, 382465573489, 1003652347081
Offset: 1

Views

Author

Jonathan Sondow, Apr 13 2015

Keywords

Comments

a(n) is the largest prime factor of n, since pi(n) ~ n / log n.

Examples

			pi(6) = 3 is prime, and 3 divides 6, so 3 is a member.
		

Crossrefs

Programs

  • Mathematica
    c = 0; lpf[n_] := If[ PrimeQ[n], c++; n, Transpose[ FactorInteger[n]][[1, -1]]]; Do[ If[lpf[n] == c, Print[ PrimePi[n]]], {n, 2, 10^7}]
    PrimePi[Select[Select[Range[2,10^6],IntegerQ[#/PrimePi[#]]&],PrimeQ[PrimePi[#]]&]] (* Ivan N. Ianakiev, Apr 15 2015 *)
    Select[Table[{PrimePi[n],n},{n,10^6}],PrimeQ[#[[1]]]&&Divisible[#[[2]],#[[1]]]&][[All,1]] (* The program generates the first 9 terms of the sequence. To generate more, increase the constant for n. *) (* Harvey P. Dale, Feb 08 2022 *)
  • PARI
    for(n=1,10^6,if(isprime(p=primepi(n))&&!(n%primepi(n)),print1(p,", "))) \\ Derek Orr, Apr 14 2015

Formula

a(n) = A000720(A071394(n)) = A006530(A071394(n)).

Extensions

More terms from Giovanni Resta, Sep 01 2018
Showing 1-3 of 3 results.