cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A360224 Number of k < n such that gcd(k, n) > 1, gcd(n^2-1, k) = 1, and rad(k) does not divide n.

This page as a plain text file.
%I A360224 #32 May 20 2023 14:49:52
%S A360224 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,3,0,0,0,2,0,3,0,2,1,4,0,5,0,5,2,1,
%T A360224 0,4,0,6,2,6,0,12,0,5,3,7,0,14,0,5,2,10,0,11,0,4,5,13,0,19,0,12,7,7,1,
%U A360224 13,0,14,3,11,0,31,0,13,9,8,2,21,0,19,7,21,0,18,2,13,9,22,0,21,1,16,10,16
%N A360224 Number of k < n such that gcd(k, n) > 1, gcd(n^2-1, k) = 1, and rad(k) does not divide n.
%C A360224 Number of terms in row n of A272619 that are coprime to (n-1)*(n+1).
%H A360224 Michael De Vlieger, <a href="/A360224/b360224.txt">Table of n, a(n) for n = 1..10000</a>
%H A360224 Michael De Vlieger, <a href="/A360224/a360224.png">Scatterplot of a(n)</a>, n = 1..2*10^5.
%H A360224 Michael De Vlieger, <a href="/A360224/a360224_1.png">Log log scatterplot of a(n)</a>, n = 1..2*10^5.
%F A360224 a(n) <= A243822(n).
%e A360224 Let S(n) = row n of A272619.
%e A360224 a(p) = 0 since S(p) is empty.
%e A360224 a(4) = 0 since S(4) is empty.
%e A360224 a(6) = 0 since S(6) is empty.
%e A360224 a(8) = 0 since S(8) = {6}, but gcd(6,(8+1)) = 3.
%e A360224 a(10) = 0 since S(10) = {6}, but gcd(6,(10-1)) = 3.
%e A360224 a(12) = 1 since S(12) = {10}, and gcd(10,143) = 1.
%e A360224 a(16) = 1 since S(16) = {6, 10, 12, 14}, but only 14 is such that gcd(14, 255) = 1.
%e A360224 a(18) = 3 since S(18) = {10, 14, 15}, and none of these share a prime factor with 323.
%e A360224 a(20) = 0 since S(20) = {6, 12, 14, 15, 18}, and all of these share a factor with 21.
%t A360224 Table[Count[Range[k], _?(Nor[CoprimeQ[#, k], GCD[k^2 - 1, #] > 1, Divisible[k, Times @@ FactorInteger[#][[All, 1]]]] &)], {k, 120}]
%o A360224 (PARI) rad(n) = factorback(factorint(n)[, 1]); \\ A007947
%o A360224 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
%Y A360224 Cf. A045763, A243823, A272619.
%K A360224 nonn
%O A360224 1,18
%A A360224 _Michael De Vlieger_, May 19 2023