OFFSET
0
COMMENTS
k is strongly prime to n iff k is relatively prime to n and k does not divide n-1.
T(n,p) = p is prime and [p is strong prime to n], [] denotes the Iverson bracket.
LINKS
Peter Luschny, Strong coprimality.
EXAMPLE
[n=0] 0
[n=1] 0, 0
[n=2] 0, 0, 0
[n=3] 0, 0, 0, 0
[n=4] 0, 0, 0, 0, 0
[n=5] 0, 0, 0, 1, 0, 0
[n=6] 0, 0, 0, 0, 0, 0, 0
[n=7] 0, 0, 0, 0, 0, 1, 0, 0
Let n = 5 then the numbers prime to n are {1, 2, 3, 4} and the positive divisors of n-1 are {1, 2, 4}. Thus only the prime 3 is strong prime to 5.
MAPLE
A181838_triangle := proc(M)
local Primes, strongCoprimes, strongCoprimePrimes, triangle;
Primes := n -> select(k->isprime(k), {$1..n}):
strongCoprimes := n -> select(k->igcd(k, n)=1, {$1..n})
minus numtheory[divisors](n-1):
strongCoprimePrimes := n -> Primes(n) intersect strongCoprimes(n):
triangle := proc(N, C) local T, L, k, n;
for n from 0 to N do
T := C(n); L := NULL;
for k from 0 to n do
L := L, `if`(member(k, T), 1, 0)
od;
print(L)
od end:
triangle(M, strongCoprimePrimes) end:
MATHEMATICA
strongCoprimeQ[k_, n_] := PrimeQ[k] && CoprimeQ[n, k] && !Divisible[n-1, k]; Table[Boole[strongCoprimeQ[k, n]], {n, 0, 15}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 19 2013 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Nov 17 2010
EXTENSIONS
Keyword tabl by Michel Marcus, Apr 08 2013
STATUS
approved