[go: up one dir, main page]

login
Revision History for A085118 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Primes together with twice the odd primes.
(history; published version)
#38 by Michel Marcus at Fri Oct 18 01:43:45 EDT 2024
STATUS

reviewed

approved

#37 by Stefano Spezia at Fri Oct 18 00:58:30 EDT 2024
STATUS

proposed

reviewed

#36 by Chai Wah Wu at Thu Oct 17 22:22:33 EDT 2024
STATUS

editing

proposed

#35 by Chai Wah Wu at Thu Oct 17 22:22:25 EDT 2024
PROG

return kmax def f(x): return int(n+x-primepi(x)-primepi(x>>1)+(x>=4))

def f(x): return int(n+x-primepi(x)-primepi(x>>1)+(x>=4))

#34 by Chai Wah Wu at Thu Oct 17 22:22:02 EDT 2024
PROG

return bisection(f, n, n) # Chai Wah Wu, Oct 17 2024

#33 by Chai Wah Wu at Thu Oct 17 22:21:50 EDT 2024
PROG

(Python)

from sympy import primepi

def A085118(n):

def bisection(f, kmin=0, kmax=1):

while f(kmax) > kmax: 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 int(n+x-primepi(x)-primepi(x>>1)+(x>=4))

return bisection(f, n, n) # Chai Wah Wu, Oct 17 2024

STATUS

approved

editing

#32 by Michel Marcus at Fri Jun 04 11:41:17 EDT 2021
STATUS

reviewed

approved

#31 by Joerg Arndt at Fri Jun 04 10:57:41 EDT 2021
STATUS

proposed

reviewed

#30 by Felix Fröhlich at Thu Jun 03 09:51:25 EDT 2021
STATUS

editing

proposed

#29 by Felix Fröhlich at Thu Jun 03 09:51:15 EDT 2021
LINKS

G. L. Cohen and S. L. Segal, <a href="http://www.fq.math.ca/Scanned/27-3/cohen.pdf">A note concerning those n for which phi(n)+1 divides n</a>, Fibonacci Quarterly , Vol. 27 , No. 3 (1989), no. 3, pp. 285-286.

STATUS

proposed

editing