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”).

A288939
Nonprime numbers k such that k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 is prime.
2
1, 6, 14, 26, 38, 40, 46, 56, 60, 66, 68, 72, 80, 87, 93, 95, 115, 122, 126, 128, 146, 156, 158, 160, 180, 186, 192, 203, 206, 208, 220, 221, 235, 237, 238, 264, 266, 280, 282, 290, 294, 300, 303, 320, 341, 350, 363, 381, 395, 399, 404, 405, 417, 418, 436, 438, 447, 450
OFFSET
1,2
COMMENTS
A163268 Union {This sequence} = A100330.
The corresponding prime numbers k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 = 1111111_k are in A194194; all these Brazilian primes belong to A085104 and A285017.
EXAMPLE
6 is in the sequence because 6^6 + 6^5 + 6^4 + 6^3 + 6^2 + 6 + 1 = 1111111_6 = 55987 which is prime.
MAPLE
for n from 1 to 200 do s(n):= 1+n+n^2+n^3+n^4+n^5+n^6;
if not isprime(n) and isprime(s(n)) then print(n, s(n)) else fi; od:
MATHEMATICA
Select[Range@ 450, And[! PrimeQ@ #, PrimeQ@ Total[#^Range[0, 6]]] &] (* Michael De Vlieger, Jun 19 2017 *)
PROG
(PARI) isok(n) = !isprime(n) && isprime(1+n+n^2+n^3+n^4+n^5+n^6); \\ Michel Marcus, Jun 19 2017
(Python)
from sympy import isprime
A288939_list = [n for n in range(10**3) if not isprime(n) and isprime(n*(n*(n*(n*(n*(n + 1) + 1) + 1) + 1) + 1) + 1)] # Chai Wah Wu, Jul 13 2017
KEYWORD
nonn
AUTHOR
Bernard Schott, Jun 19 2017
STATUS
approved