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!)
A322937 Triangular array in which the n-th row lists the primes strongly prime to n (in ascending order). For the empty rows n = 1, 2, 3, 4 and 6 we set by convention 0. 3
0, 0, 0, 0, 3, 0, 5, 3, 5, 5, 7, 7, 3, 7, 5, 7, 5, 7, 11, 3, 5, 11, 11, 13, 7, 11, 13, 3, 5, 7, 11, 13, 5, 7, 11, 13, 5, 7, 11, 13, 17, 3, 7, 11, 13, 17, 11, 13, 17, 19, 5, 13, 17, 19, 3, 5, 7, 13, 17, 19, 5, 7, 11, 13, 17, 19, 7, 11, 13, 17, 19, 23 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
A number k is strongly prime to n if and only if k <= n is prime to n and k does not divide n-1. See the link to 'Strong Coprimality'. (Our terminology follows the plea of Knuth, Graham and Patashnik in Concrete Mathematics, p. 115.)
LINKS
Peter Luschny, Strong Coprimality
EXAMPLE
The length of row n is A181834(n). The triangular array starts:
[1] {}
[2] {}
[3] {}
[4] {}
[5] {3}
[6] {}
[7] {5}
[8] {3, 5}
[9] {5, 7}
[10] {7}
[11] {3, 7}
[12] {5, 7}
[13] {5, 7, 11}
[14] {3, 5, 11}
[15] {11, 13}
[16] {7, 11, 13}
[17] {3, 5, 7, 11, 13}
[18] {5, 7, 11, 13}
[19] {5, 7, 11, 13, 17}
[20] {3, 7, 11, 13, 17}
MAPLE
Primes := n -> select(isprime, {$1..n}):
StrongCoprimes := n -> select(k->igcd(k, n)=1, {$1..n}) minus numtheory:-divisors(n-1):
StrongCoprimePrimes := n -> Primes(n) intersect StrongCoprimes(n):
A322937row := proc(n) if n in {1, 2, 3, 4, 6} then return 0 else op(StrongCoprimePrimes(n)) fi end:
seq(A322937row(n), n=1..25);
MATHEMATICA
Table[Select[Prime@ Range@ PrimePi@ n, And[GCD[#, n] == 1, Mod[n - 1, #] != 0] &] /. {} -> {0}, {n, 25}] // Flatten (* Michael De Vlieger, Apr 01 2019 *)
PROG
(Sage)
def primes_primeto(n):
return [p for p in prime_range(n) if gcd(p, n) == 1]
def primes_strongly_primeto(n):
return [p for p in set(primes_primeto(n)) - set((n-1).divisors())]
def A322937row(n):
if n in [1, 2, 3, 4, 6]: return [0]
return sorted(primes_strongly_primeto(n))
for n in (1..25): print(A322937row(n))
CROSSREFS
Sequence in context: A179179 A291503 A108500 * A326989 A326937 A336597
KEYWORD
nonn,tabf
AUTHOR
Peter Luschny, Apr 01 2019
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 5 12:04 EDT 2024. Contains 372275 sequences. (Running on oeis4.)