[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 A346149 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) is the least integer k > 1 such that n^k + n + 1 is prime, or 0 if there is no such k.
(history; published version)
#13 by N. J. A. Sloane at Fri Jul 09 22:58:09 EDT 2021
STATUS

reviewed

approved

#12 by Hugo Pfoertner at Thu Jul 08 16:16:17 EDT 2021
STATUS

proposed

reviewed

#11 by Michael S. Branicky at Thu Jul 08 15:21:52 EDT 2021
STATUS

editing

proposed

#10 by Michael S. Branicky at Thu Jul 08 15:21:49 EDT 2021
PROG

(Python)

from sympy import isprime

def a(n):

if n > 1 and n%3 == 1: return 0

k = 2

while not isprime(n**k + n + 1): k += 1

return k

print([a(n) for n in range(1, 96)]) # Michael S. Branicky, Jul 08 2021

STATUS

proposed

editing

#9 by Robert Israel at Thu Jul 08 13:50:34 EDT 2021
STATUS

editing

proposed

#8 by Robert Israel at Thu Jul 08 13:50:24 EDT 2021
LINKS

Robert Israel, <a href="/A346149/b346149.txt">Table of n, a(n) for n = 1..212</a>

STATUS

approved

editing

#7 by Susanna Cuyler at Wed Jul 07 15:46:20 EDT 2021
STATUS

reviewed

approved

#6 by Joerg Arndt at Wed Jul 07 02:06:21 EDT 2021
STATUS

proposed

reviewed

#5 by Michel Marcus at Wed Jul 07 01:37:15 EDT 2021
STATUS

editing

proposed

#4 by Michel Marcus at Wed Jul 07 01:37:12 EDT 2021
PROG

(PARI) a(n) = if ((n>1) && ((n%3)==1), 0, my(k=2); while (!isprime(n^k+n+1), k++); k); \\ Michel Marcus, Jul 07 2021

STATUS

proposed

editing