OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 2n for odd n. - Robert Israel, Apr 12 2016
a(n) = n * A102457(n) for n > 1. - Thomas Ordowski, Apr 13 2016
EXAMPLE
Because of the definition of (pseudo)primes to base 2, a(2) is the least element of A006935 greater than 2. - Altug Alkan, Apr 12 2016
MATHEMATICA
Table[SelectFirst[Range[n + 1, 10^6], Function[k, Divisible[k, n] && PowerMod[n, k, k] == Mod[n, k]]], {n, 60}] (* Michael De Vlieger, Apr 12 2016, Version 10 *)
PROG
(PARI) a(n) = {k = n+1; while( !(((k % n)==0) && (Mod(n, k)^k == Mod(n, k))), k++); k; } \\ Michel Marcus, Apr 12 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Apr 12 2016
EXTENSIONS
More terms from Michel Marcus, Apr 12 2016
STATUS
approved