OFFSET
1,2
LINKS
Nick Hobson, Table of n, a(n) for n = 1..10000 (first 1832 terms from Antti Karttunen)
Nick Hobson, C program.
EXAMPLE
gcd(1!+1, 1^1+1) = 2, gcd(2!+1, 2^2+1) = 1 and gcd(3!+1, 3^3+1) = 7, so 1 and 3 are the first two terms of the sequence.
MATHEMATICA
Select[Range[1500], (GCD[ #!+1, #^#+1] > 1)&]
PROG
(PARI) isok(n) = gcd(n! + 1, n^n + 1) != 1; \\ Michel Marcus, Jul 22 2018
(C) See Links section.
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Resta, Mar 01 2006
STATUS
approved