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”).
%I #25 Jul 22 2021 23:52:37
%S 1,6,14,26,38,40,46,56,60,66,68,72,80,87,93,95,115,122,126,128,146,
%T 156,158,160,180,186,192,203,206,208,220,221,235,237,238,264,266,280,
%U 282,290,294,300,303,320,341,350,363,381,395,399,404,405,417,418,436,438,447,450
%N Nonprime numbers k such that k^6 + k^5 + k^4 + k^3 + k^2 + k + 1 is prime.
%C A163268 Union {This sequence} = A100330.
%C 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.
%H Chai Wah Wu, <a href="/A288939/b288939.txt">Table of n, a(n) for n = 1..10000</a>
%e 6 is in the sequence because 6^6 + 6^5 + 6^4 + 6^3 + 6^2 + 6 + 1 = 1111111_6 = 55987 which is prime.
%p for n from 1 to 200 do s(n):= 1+n+n^2+n^3+n^4+n^5+n^6;
%p if not isprime(n) and isprime(s(n)) then print(n,s(n)) else fi; od:
%t Select[Range@ 450, And[! PrimeQ@ #, PrimeQ@ Total[#^Range[0, 6]]] &] (* _Michael De Vlieger_, Jun 19 2017 *)
%o (PARI) isok(n) = !isprime(n) && isprime(1+n+n^2+n^3+n^4+n^5+n^6); \\ _Michel Marcus_, Jun 19 2017
%o (Python)
%o from sympy import isprime
%o 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
%Y Cf. A053716, A085104, A088550, A100330, A163268, A194194, A194257, A285017.
%K nonn
%O 1,2
%A _Bernard Schott_, Jun 19 2017