OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
Wikipedia, Cyclotomic polynomial
FORMULA
Phi_7(x) = x^6 + x^5 + x^4 + x^3 + x^2 + x + 1. - Georg Fischer, Mar 07 2026
EXAMPLE
29 is prime and f(29^6+29^5+29^4+29^3+29^2+29+1) = 54672347801779330810964871392077416495507203132755717 is prime. Thus, 29 is a member of this sequence.
MAPLE
f:= unapply(numtheory[cyclotomic](7, x), x):
q:= p-> isprime(p) and isprime(f(f(p))):
select(q, [$1..183000])[]; # Alois P. Heinz, Mar 07 2026
PROG
(Python)
import sympy
from sympy import isprime
{print(n) for n in range(10**6) if isprime(n) and isprime((n**6+n**5+n**4+n**3+n**2+n+1)**6+(n**6+n**5+n**4+n**3+n**2+n+1)**5+(n**6+n**5+n**4+n**3+n**2+n+1)**4+(n**6+n**5+n**4+n**3+n**2+n+1)**3+(n**6+n**5+n**4+n**3+n**2+n+1)**2+(n**6+n**5+n**4+n**3+n**2+n+1)+1)}
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Derek Orr, Feb 08 2014
EXTENSIONS
Definition corrected by Georg Fischer, Mar 07 2026
STATUS
approved
