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

A087267 a(n) = gcd(n, pi(n)) where pi is A000720.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 1, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1, 4, 1, 2, 1, 3, 1, 1, 9, 1, 1, 10, 1, 1, 11, 1, 1, 1, 1, 2, 3, 4, 1, 1, 1, 2, 1, 2, 1, 3, 1, 5, 3, 1, 1, 2, 1, 8, 1, 2, 1, 1, 1, 2, 9, 2, 1, 6, 1, 1, 1, 1, 1, 4, 1, 1, 3, 1, 7, 3, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 6, 1, 4, 3, 2, 1, 24, 1, 1, 1, 25, 1, 2, 1
Offset: 1

Views

Author

Labos Elemer, Sep 16 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[GCD[w, PrimePi[w]], {w, 1, 256}]
  • PARI
    a(n) = gcd(n, primepi(n)); \\ Michel Marcus, Apr 22 2018

A087269 Nonprime solutions to gcd(x, pi(x)) = gcd(x, A000720(x)) = 1.

Original entry on oeis.org

1, 9, 12, 18, 21, 25, 26, 28, 32, 34, 35, 36, 42, 45, 49, 52, 55, 57, 60, 65, 68, 69, 70, 74, 76, 81, 84, 85, 86, 87, 88, 91, 95, 98, 99, 104, 106, 110, 111, 112, 119, 121, 128, 129, 130, 133, 135, 141, 143, 145, 147, 155, 158, 159, 160, 161, 162, 165, 170, 172, 177
Offset: 1

Views

Author

Labos Elemer, Sep 16 2003

Keywords

Comments

What is the density of this sequence? - David A. Corneth, Oct 21 2019

Examples

			There are 37 primes below the nonprime 162, so pi(162) = 37 and as gcd(162, pi(162)) = gcd(162, 37) = 1, 162 is in the sequence. - _David A. Corneth_, Oct 21 2019
		

Crossrefs

Programs

  • Mathematica
    t=Table[GCD[w, PrimePi[w]], {w, 1, 1000}]; f=Flatten[Position[t, 1]]; cf=Part[f, Flatten[Position[PrimeQ[f], False]]]
  • PARI
    first(n) = {n = max(n, 2); my(q = 2, i = 1, t = 1, res = vector(n)); res[1] = 1; forprime(p = 3, oo, for(j = q + 1, p - 1, if(gcd(t, j) == 1, i++; if(i <= n, res[i] = j; , return(res); ) ) ); t++; q = p ) } \\ David A. Corneth, Oct 21 2019

A087268 Solutions to gcd(x, pi(x)) = 1, where pi is A000720.

Original entry on oeis.org

1, 2, 3, 5, 7, 9, 11, 12, 13, 17, 18, 19, 21, 23, 25, 26, 28, 29, 31, 32, 34, 35, 36, 37, 41, 42, 43, 45, 47, 49, 52, 53, 55, 57, 59, 60, 61, 65, 67, 68, 69, 70, 71, 73, 74, 76, 79, 81, 83, 84, 85, 86, 87, 88, 89, 91, 95, 97, 98, 99, 101, 103, 104, 106, 107, 109, 110, 111
Offset: 1

Views

Author

Labos Elemer, Sep 16 2003

Keywords

Examples

			All primes are included.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Position[Table[GCD[w, PrimePi[w]], {w, 1, 256}], 1]]
  • PARI
    isok(n) = gcd(n, primepi(n)) == 1; \\ Michel Marcus, Apr 22 2018

A087270 Solutions to gcd(x,pi(x)) = gcd(x, A000720(x)) > 1. Numbers x such that x and pi(x) have common divisor larger than one.

Original entry on oeis.org

4, 6, 8, 10, 14, 15, 16, 20, 22, 24, 27, 30, 33, 38, 39, 40, 44, 46, 48, 50, 51, 54, 56, 58, 62, 63, 64, 66, 72, 75, 77, 78, 80, 82, 90, 92, 93, 94, 96, 100, 102, 105, 108, 114, 115, 116, 117, 118, 120, 122, 123, 124, 125, 126, 132, 134, 136, 138, 140, 142, 144, 146
Offset: 1

Views

Author

Labos Elemer, Sep 16 2003

Keywords

Crossrefs

Programs

  • Mathematica
    t=Table[GCD[w, PrimePi[w]], {w, 1, 1000}]; Flatten[Position[Sign[t-1], 1]]

A087271 Least number x such that gcd(x, pi(x)) = n.

Original entry on oeis.org

1, 4, 6, 8, 50, 66, 77, 56, 27, 30, 33, 156, 169, 182, 465, 224, 238, 252, 2299, 1380, 189, 902, 207, 96, 100, 1872, 1323, 2464, 1247, 120, 1333, 3168, 528, 1258, 1295, 828, 3441, 2888, 1755, 5800, 1271, 1932, 731, 748, 765, 2852, 2209, 11568, 2695, 4000
Offset: 1

Views

Author

Labos Elemer, Sep 16 2003

Keywords

Examples

			n=253: a(253)=91586, pi(91586)=8855,
gcd(91586, 8855) = 253 first time.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := GCD[x, PrimePi[x]]; t=Table[0, {257}]; Do[s=f[n]; If[s<258&&t[[s]]==0, t[[s]]=n], {n, 1, 100000}]; t
    Module[{tbl=Table[{x,GCD[x,PrimePi[x]]},{x,12000}]},Table[SelectFirst[ tbl,#[[2]]==n&],{n,50}]][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 12 2020 *)

Formula

a(n) = Min{x; gcd(x, A000720(x))=n}.
Showing 1-5 of 5 results.