[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

Showing entries 1-10 | older changes
Least positive integer m > 1 such that 1 - m^k + m^(2*k) is prime, where k=A003586(n).
(history; published version)
#37 by N. J. A. Sloane at Wed Oct 23 00:43:18 EDT 2024
STATUS

proposed

approved

#36 by Chai Wah Wu at Tue Oct 22 11:59:20 EDT 2024
STATUS

editing

proposed

#35 by Chai Wah Wu at Tue Oct 22 11:59:15 EDT 2024
PROG

return next(filter(lambda m:isprime(1-m**k+m**(k<<1)), count(2))) # Chai Wah Wu, Oct 22 2024

#34 by Chai Wah Wu at Tue Oct 22 11:58:58 EDT 2024
PROG

(Python)

from itertools import count

from sympy import isprime, integer_log

def A205506(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 n+x-sum((x//3**i).bit_length() for i in range(integer_log(x, 3)[0]+1))

k = bisection(f, n, n)

return next(filter(lambda m:isprime(1-m**k+m**(k<<1)), count(2))) # Chai Wah Wu, Oct 22 2024

STATUS

approved

editing

#33 by N. J. A. Sloane at Mon Sep 16 12:48:33 EDT 2024
STATUS

proposed

approved

#32 by Chai Wah Wu at Mon Sep 16 09:23:28 EDT 2024
STATUS

editing

proposed

#31 by Chai Wah Wu at Mon Sep 16 09:22:47 EDT 2024
FORMULA

a(n) = A085396is smallest positive m such that Phi(A033845(n),m) is prime. - Chai Wah Wu, Sep 16 2024

STATUS

proposed

editing

#30 by Chai Wah Wu at Mon Sep 16 09:20:03 EDT 2024
STATUS

editing

proposed

#29 by Chai Wah Wu at Mon Sep 16 09:19:57 EDT 2024
FORMULA

a(n) = A085396(A033845(n)). - Chai Wah Wu, Sep 16 2024

CROSSREFS
STATUS

approved

editing

#28 by Michael De Vlieger at Sun Jan 01 09:44:29 EST 2023
STATUS

reviewed

approved