OFFSET
0,6
COMMENTS
k is strong prime to n iff k is coprime to n and k does not divide n-1.
LINKS
Peter Luschny, Strong coprimality.
EXAMPLE
a(11) = min{3, 4, 6, 7, 8, 9} = 3.
MAPLE
with(numtheory):
Primes := n -> select(k->isprime(k), {$1..n}):
StrongCoprimes := n -> select(k->igcd(k, n)=1, {$1..n}) minus divisors(n-1):
A181839 := proc(n) min(op(StrongCoprimes(n))); subs(infinity=0, %) end:
MATHEMATICA
a[n_] := Min[ Select[ Range[n-1], CoprimeQ[#, n] && ! Divisible[n-1, #] &] ] /. Infinity -> 0; a[1] = 1; Table[a[n], {n, 0, 66}] (* Jean-François Alcover, Jun 27 2013 *)
PROG
(PARI) a(n)={ for(k=2, n-2, gcd(k, n)==1 & (n-1)%k & return(k)); n==1 } \\ M. F. Hasler, Nov 17 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Nov 17 2010
STATUS
approved