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.

A073458 a(n) = floor(prime(n)/composite(n)).

This page as a plain text file.
%I A073458 #15 Dec 21 2020 12:38:44
%S A073458 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
%T A073458 2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
%U A073458 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,3,4,4,4,4,4,4
%N A073458 a(n) = floor(prime(n)/composite(n)).
%H A073458 Robert Israel, <a href="/A073458/b073458.txt">Table of n, a(n) for n = 1..10000</a>
%F A073458 a(n) = floor(A000040(n)/A002808(n)).
%p A073458 nextcomp:= proc(x) if isprime(x+1) then x+2 else x+1 fi end proc:
%p A073458 p:= 2; c:= 4: A[1]:= 0:
%p A073458 for n from 2 to 200 do
%p A073458   p:= nextprime(p); c:= nextcomp(c);
%p A073458   A[n]:= floor(p/c);
%p A073458 od:
%p A073458 seq(A[i],i=1..200); # _Robert Israel_, Sep 28 2016
%t A073458 Composite[n_] := FixedPoint[n + PrimePi[#] + 1&, n + PrimePi[n] + 1];
%t A073458 a[n_] := Floor[Prime[n]/Composite[n]];
%t A073458 Array[a, 100] (* _Jean-François Alcover_, Jun 09 2020, after _Robert G. Wilson v_ in A002808 *)
%t A073458 Module[{nn=200,cmps},cmps=Select[Range[nn],CompositeQ];Floor[#[[1]]/ #[[2]]]&/@ Thread[{Prime[Range[Length[cmps]]],cmps}]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Dec 21 2020 *)
%Y A073458 Cf. A000040, A002808, A073459.
%K A073458 nonn
%O A073458 1,16
%A A073458 _Labos Elemer_, Aug 02 2002