OFFSET
1,7
COMMENTS
Let cophi(n) be the cototient function A051953(n). Then cophi(n) = S(n,1) = S(n,n).
LINKS
Peter Luschny, Euler's totient function
EXAMPLE
[x][1][2][3][4][5][6][7][8]
[1] 0, 0, 0, 0, 0, 0, 0, 0
[2] 1, 1, 1, 1, 1, 1, 1, 1
[3] 1, 2, 1, 2, 1, 2, 1, 2
[4] 2, 2, 3, 2, 2, 3, 2, 2
[5] 1, 2, 2, 3, 1, 3, 1, 3
[6] 4, 4, 4, 4, 5, 4, 4, 4
[7] 1, 2, 2, 3, 2, 4, 1, 3
[8] 4, 4, 5, 4, 5, 5, 5, 4
Triangle k=1..n, n>=1:
[1] 0
[2] 1, 1
[3] 1, 2, 1
[4] 2, 2, 3, 2
[5] 1, 2, 2, 3, 1
[6] 4, 4, 4, 4, 5, 4
[7] 1, 2, 2, 3, 2, 4, 1
[8] 4, 4, 5, 4, 5, 5, 5, 4
Triangle n=1..k, k>=1:
[1] 0
[2] 0, 1
[3] 0, 1, 1
[4] 0, 1, 2, 2
[5] 0, 1, 1, 2, 1
[6] 0, 1, 2, 3, 3, 4
[7] 0, 1, 1, 2, 1, 4, 1
[8] 0, 1, 2, 2, 3, 4, 3, 4
S(15, 22) = card({2,3,5,6,9,10,11,12,15}) = 9 as
the defining set is {1,2,..,15} minus {1,4,7,8,13,14}.
MAPLE
strongdivisors := n -> numtheory[divisors](n) minus {1}:
coprimes := n -> select(k->igcd(k, n)=1, {$1..n}):
S := (n, k) -> nops({seq(i, i={$1..n})}
minus((coprimes(n) minus strongdivisors(k)))):
seq(seq(S(n-k+1, k), k=1..n), n=1..8); # Square array by antidiagonals.
seq(print(seq(S(n, k), k=1..n)), n=1..8); # Lower triangle.
seq(print(seq(S(n, k), n=1..k)), k=1..8); # Upper triangle.
MATHEMATICA
s[n_, k_] := Complement[ Range[n], Complement[ Select[ Range[n], CoprimeQ[#, n]&], Divisors[k] // Rest]] // Length; Table[ s[n-k+1, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 30 2013 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Aug 06 2011
STATUS
approved