login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181839 Minimum of { k<n | k>0 is strong prime to n}, or zero if this set is empty. 2

%I #14 Jan 27 2021 05:31:02

%S 0,1,0,0,0,3,0,4,3,5,7,3,5,5,3,4,7,3,5,4,3,8,5,3,5,7,3,4,5,3,7,4,3,5,

%T 5,3,11,5,3,4,7,3,5,4,3,7,7,3,5,5,3,4,5,3,5,4,3,5,5,3,7,7,3,4,5,3,7

%N Minimum of { k<n | k>0 is strong prime to n}, or zero if this set is empty.

%C k is strong prime to n iff k is coprime to n and k does not divide n-1.

%H Peter Luschny, <a href="http://www.oeis.org/wiki/User:Peter_Luschny/StrongCoprimality">Strong coprimality</a>.

%e a(11) = min{3, 4, 6, 7, 8, 9} = 3.

%p with(numtheory):

%p Primes := n -> select(k->isprime(k),{$1..n}):

%p StrongCoprimes := n -> select(k->igcd(k,n)=1,{$1..n}) minus divisors(n-1):

%p A181839 := proc(n) min(op(StrongCoprimes(n)));subs(infinity=0,%) end:

%t 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 *)

%o (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

%Y Cf. A181830, A181840.

%K nonn

%O 0,6

%A _Peter Luschny_, Nov 17 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 5 14:34 EDT 2024. Contains 375700 sequences. (Running on oeis4.)