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.

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

This page as a plain text file.
%I A087271 #10 Feb 12 2020 19:49:14
%S A087271 1,4,6,8,50,66,77,56,27,30,33,156,169,182,465,224,238,252,2299,1380,
%T A087271 189,902,207,96,100,1872,1323,2464,1247,120,1333,3168,528,1258,1295,
%U A087271 828,3441,2888,1755,5800,1271,1932,731,748,765,2852,2209,11568,2695,4000
%N A087271 Least number x such that gcd(x, pi(x)) = n.
%F A087271 a(n) = Min{x; gcd(x, A000720(x))=n}.
%e A087271 n=253: a(253)=91586, pi(91586)=8855,
%e A087271 gcd(91586, 8855) = 253 first time.
%t A087271 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
%t A087271 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 *)
%Y A087271 Cf. A007053, A000720, A087266-A087269, A057809.
%K A087271 nonn
%O A087271 1,2
%A A087271 _Labos Elemer_, Sep 16 2003