OFFSET
1,18
COMMENTS
Number of terms in row n of A272619 that are coprime to (n-1)*(n+1).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Scatterplot of a(n), n = 1..2*10^5.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2*10^5.
FORMULA
a(n) <= A243822(n).
EXAMPLE
Let S(n) = row n of A272619.
a(p) = 0 since S(p) is empty.
a(4) = 0 since S(4) is empty.
a(6) = 0 since S(6) is empty.
a(8) = 0 since S(8) = {6}, but gcd(6,(8+1)) = 3.
a(10) = 0 since S(10) = {6}, but gcd(6,(10-1)) = 3.
a(12) = 1 since S(12) = {10}, and gcd(10,143) = 1.
a(16) = 1 since S(16) = {6, 10, 12, 14}, but only 14 is such that gcd(14, 255) = 1.
a(18) = 3 since S(18) = {10, 14, 15}, and none of these share a prime factor with 323.
a(20) = 0 since S(20) = {6, 12, 14, 15, 18}, and all of these share a factor with 21.
MATHEMATICA
Table[Count[Range[k], _?(Nor[CoprimeQ[#, k], GCD[k^2 - 1, #] > 1, Divisible[k, Times @@ FactorInteger[#][[All, 1]]]] &)], {k, 120}]
PROG
(PARI) rad(n) = factorback(factorint(n)[, 1]); \\ A007947
a(n) = sum(k=1, n-1, (gcd(k, n)>1) && (gcd(n^2-1, k) == 1) && (n % rad(k))); \\ Michel Marcus, May 20 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, May 19 2023
STATUS
approved