A181970 Places of nonprimes in A050376.
3, 6, 9, 13, 20, 28, 37, 47, 63, 71, 83, 111, 127, 160, 177, 235, 280, 301, 348, 377, 430, 509, 542, 633, 700, 731, 838, 875, 915, 1030, 1194, 1284, 1327, 1415, 1458, 1559, 1752, 1915, 2015, 2181, 2231, 2531, 2590, 2773, 2960, 3089, 3154, 3289, 3485, 3562, 3919, 3997, 4142
Offset: 1
Keywords
Examples
Show that 28 not expressed in form pi(p) + pi(sqrt(p)) + pi((sqrt(sqrt(p)))) +... with prime p. Indeed, for p=79, this sum is 22+4+1=27, while for p=83, it is 23+4+2=29.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
PARI
first_few(lim)=my(v=List(apply(n->n^2, primes(primepi(sqrtint(lim))))),u,t); forprime(p=2,(lim+.5)^(1/4),t=p^2;while((t=t^2)<=lim,listput(v,t)));listput(v,1);v=vecsort(Vec(v));u=vector(#v-1,i,sum(j=v[i]+1,v[i+1]-1,isprime(j)));u[1]++;for(i=2, #u, u[i]+=u[i-1]+1);u \\ Charles R Greathouse IV, Apr 10 2012
-
Python
from sympy import primepi, integer_nthroot def A181970(n): def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 kmin = kmax >> 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax def f(x): return n+x-sum(primepi(integer_nthroot(x,1<Chai Wah Wu, Feb 18-19 2025
Formula
a(n) ~ 0.5 n^2 log n. - Charles R Greathouse IV, Apr 11 2012
Extensions
a(30)-a(53) from Charles R Greathouse IV, Apr 10 2012
Comments