OFFSET
1,2
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Bernard Schott, Jun 19 2017
STATUS
approved