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.

A087797 Primes, squares of primes and cubes of primes.

This page as a plain text file.
%I A087797 #23 Aug 09 2024 15:14:50
%S A087797 2,3,4,5,7,8,9,11,13,17,19,23,25,27,29,31,37,41,43,47,49,53,59,61,67,
%T A087797 71,73,79,83,89,97,101,103,107,109,113,121,125,127,131,137,139,149,
%U A087797 151,157,163,167,169,173,179,181,191,193,197,199,211,223,227,229,233,239,241
%N A087797 Primes, squares of primes and cubes of primes.
%C A087797 Union of A000040 and A168363. - _Chai Wah Wu_, Aug 09 2024
%H A087797 Vincenzo Librandi, <a href="/A087797/b087797.txt">Table of n, a(n) for n = 1..1000</a>
%F A087797 a(n) ~ n log n. - _Charles R Greathouse IV_, Oct 19 2015
%t A087797 m=400;Union[Prime[Range[PrimePi[m]]],Prime[Range[PrimePi[m^(1/2)]]]^2,Prime[Range[PrimePi[m^(1/3)]]]^3] (* _Vladimir Joseph Stephan Orlovsky_, Apr 11 2011 *)
%t A087797 With[{nn=70},Take[Union[Flatten[{#,#^2,#^3}&/@Prime[Range[nn]]]],nn]] (* _Harvey P. Dale_, Oct 16 2012 *)
%o A087797 (PARI) is(n)=my(t=isprimepower(n)); t && t<4 \\ _Charles R Greathouse IV_, Oct 19 2015
%o A087797 (Python)
%o A087797 from math import isqrt
%o A087797 from sympy import primepi, integer_nthroot
%o A087797 def A087797(n):
%o A087797     def f(x): return n+x-primepi(x)-primepi(isqrt(x))-primepi(integer_nthroot(x,3)[0])
%o A087797     m, k = n, f(n)
%o A087797     while m != k:
%o A087797         m, k = k, f(k)
%o A087797     return int(m) # _Chai Wah Wu_, Aug 09 2024
%Y A087797 Cf. A000040, A000430, A002760, A168363.
%K A087797 nonn
%O A087797 1,1
%A A087797 _Benoit Cloitre_, Oct 10 2003