OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..112
EXAMPLE
12 = 2*2*3 and 12^2+12^2+12^3+1 = 2017 is prime. Thus, 12 is a member of this sequence.
MAPLE
isA239133 := proc(n)
ps := ifactors(n)[2] ;
1+add( op(2, p)*n^op(1, p), p=ps) ;
isprime(%) ;
end proc:
for n from 1 do
if isA239133(n) then
printf("%d, \n", n) ;
end if;
end do: # R. J. Mathar, Mar 13 2014
PROG
(Python)
import sympy
from sympy import factorint
from sympy import isprime
def Exp(x):
..lst = []
..for i in range(len(factorint(x).values())):
....for a in range(list(factorint(x).values())[i]):
......lst.append(list(factorint(x))[i])
..num = 1
..for n in lst:
....num += x**n
..if isprime(num):
....return True
x = 1
while x < 10**4:
..if Exp(x):
....print(x)
..x += 1
(PARI) is(n)=my(f=factor(n)); ispseudoprime(sum(i=1, #f~, f[i, 2]*n^f[i, 1])+1) \\ Charles R Greathouse IV, Mar 12 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Derek Orr, Mar 10 2014
STATUS
approved