The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A181840 Maximum of { k>0 | k<n and k is strongly prime to n }, or zero if this set is empty. 2
0, 1, 0, 0, 0, 3, 0, 5, 5, 7, 7, 9, 7, 11, 11, 13, 13, 15, 13, 17, 17, 19, 19, 21, 19, 23, 23, 25, 25, 27, 23, 29, 29, 31, 31, 33, 31, 35, 35, 37, 37, 39, 37, 41, 41, 43, 43, 45, 43, 47, 47, 49, 49, 51, 49, 53, 53, 55, 55, 57, 53, 59, 59, 61, 61, 63, 61, 65, 65, 67, 67, 69 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
k is strongly prime to n iff k is relatively prime to n and k does not divide n-1.
Editor's note: It seems that 1 is strongly prime to 1 by convention.
LINKS
Peter Luschny, Strong coprimality.
EXAMPLE
a(11) = max{3, 4, 6, 7, 8, 9} = 9.
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):
A181840 := proc(n) max(op(StrongCoprimes(n))); subs(infinity=0, %) end:
MATHEMATICA
a[n_] := Max[ Select[ Range[n-1], CoprimeQ[#, n] && ! Divisible[n-1, #] &]] /. -Infinity -> 0; a[1] = 1; Table[a[n], {n, 0, 71}] (* Jean-François Alcover, Jun 27 2013 *)
PROG
(PARI) a(n)={ forstep(k=n-2, 2, -1, gcd(k, n)==1 & (n-1)%k & return(k)); n==1 } \\ M. F. Hasler, Nov 17 2010
CROSSREFS
Sequence in context: A354836 A197690 A351692 * A198432 A102391 A038556
KEYWORD
nonn
AUTHOR
Peter Luschny, Nov 17 2010
STATUS
approved

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 May 15 02:58 EDT 2024. Contains 372536 sequences. (Running on oeis4.)