A078507 Duplicate of A060199.
0, 4, 5, 9, 12, 17, 21, 29, 32, 39, 49, 52, 58, 73, 76, 88, 92, 109, 117, 125, 140, 151, 159
Offset: 0
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.
a(17) = 5 because between 17^2 and 18^2, i.e., 289 and 324, there are 5 primes (which are 293, 307, 311, 313, 317).
a014085 n = sum $ map a010051 [n^2..(n+1)^2] -- Reinhard Zumkeller, Mar 18 2012
Table[PrimePi[(n + 1)^2] - PrimePi[n^2], {n, 0, 80}] (* Lei Zhou, Dec 01 2005 *) Differences[PrimePi[Range[0,90]^2]] (* Harvey P. Dale, Nov 25 2015 *)
a(n)=primepi((n+1)^2)-primepi(n^2) \\ Charles R Greathouse IV, Jun 15 2011
from sympy import primepi def a(n): return primepi((n+1)**2) - primepi(n**2) print([a(n) for n in range(81)]) # Michael S. Branicky, Jul 05 2021
a(20)=11 because 11 is the minimum odd number which when appended to 20 forms a prime (201, 203, 205, 207, 209 are all nonprime, 2011 is prime).
d[n_]:=IntegerDigits[n]; t={}; Do[k=1; While[!PrimeQ[FromDigits[Join[d[n],d[k]]]],k++]; AppendTo[t,k],{n,102}]; t (* Jayanta Basu, May 21 2013 *) mon[n_]:=Module[{k=1},While[!PrimeQ[n*10^IntegerLength[k]+k],k+=2];k]; Array[mon,110] (* Harvey P. Dale, Aug 13 2018 *)
A068695=n->for(i=1,oo,ispseudoprime(eval(Str(n,i)))&&return(i)) \\ M. F. Hasler, Oct 29 2013
from sympy import isprime from itertools import count def a(n): return next(k for k in count(1) if isprime(int(str(n)+str(k)))) print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Oct 18 2022
NextPrime[Range[0, 100]^3] (* Vladimir Joseph Stephan Orlovsky, Feb 25 2010 *)
a(n)=nextprime(n^3) \\ Charles R Greathouse IV, May 26 2015
PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k];f[n_]:=n^3;lst={};Do[AppendTo[lst,PrimePrev[f[n]]],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Feb 25 2010 *) Table[NextPrime[n^3, -1], {n, 2, 40}] (* Robert G. Wilson v, Aug 17 2010 *)
a(n) = precprime(n^3); \\ Michel Marcus, Jan 14 2023
from sympy import prevprime def a(n): return prevprime(n**3) print([a(n) for n in range(2, 41)]) # Michael S. Branicky, Jul 23 2021
a(2)=4 because the only primes < 8 are 2,3,5 and 7.
vector(100, n, primepi(n^3)) \\ Altug Alkan, Oct 17 2015
[prime_pi(n^3) for n in range(1, 45)] # Zerinvary Lajos, Jun 06 2009
a(3) = 32, as the number of primes between 3^4 = 81 and 4^4 = 256 is 32.
[0] cat [#PrimesInInterval(n^4, (n+1)^4): n in [1..50]]; // Vincenzo Librandi, Apr 30 2017
Table[PrimePi[(w+1)^4]-PrimePi[w^4], {w, 0, 100}]
a(n) = primepi((n+1)^4) - primepi(n^4); \\ Michel Marcus, Apr 29 2017
a(1) = 11 the number of primes between 1 = 1^5 and 32 = 2^5.
Table[PrimePi[(w+1)^5]-PrimePi[w^5], {w, 0, 50}]
a(n) = { primepi((n + 1)^5) - primepi((n)^5) } \\ Harry J. Smith, Aug 08 2009
pi(100) = 25, 10*pi(10) = 40, a(10) = 40-25 = 15.
n=10, 10*pi(100)=250, pi(1000)=168, a(10)=250-168=82.
Table[n*PrimePi[n^2]-PrimePi[n^3], {n, 1, 100}]
Comments