A321519 Let d(n,i), i = 1..k be the k divisors of n^2 + 1 (the number 1 is not counted). a(n) is the number of ordered pairs d(n,i) < d(n,j) such that gcd(d(n,i), d(n,j)) = 1.
0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 1, 6, 0, 1, 0, 6, 2, 1, 0, 6, 1, 6, 0, 1, 0, 6, 1, 1, 1, 6, 2, 6, 1, 1, 0, 6, 2, 1, 0, 2, 1, 11, 1, 1, 1, 25, 1, 1, 1, 1, 1, 6, 0, 6, 0, 16, 1, 1, 1, 1, 1, 6, 1, 1, 0, 6, 3, 1, 2, 1, 6, 25, 0, 6, 1, 6, 1, 1, 1, 6, 2, 25, 0, 1, 1
Offset: 1
Keywords
Examples
a(13) = 6 because the divisors {d(i)} of 13^2 + 1 = 170 (without the number 1) are {2, 5, 10, 17, 34, 85, 170}, and gcd(d(i), d(j)) = 1 for the 6 following pairs of elements of {d(i)}: (2, 5), (2, 17), (2, 85), (5, 17), (5, 34) and (10, 17).
Programs
-
Maple
with(numtheory):nn:=10^3: for n from 1 to nn do: it:=0:d:=divisors(n^2+1):n0:=nops(d): for k from 2 to n0-1 do: for l from k+1 to n0 do: if gcd(d[k],d[l])= 1 then it:=it+1 else fi: od: od: printf(`%d, `,it): od:
-
Mathematica
f[n_] := (DivisorSigma[0, n^2] - 1)/2 - DivisorSigma[0, n] + 1; Map[f, Range[0,100]^2+1] (* Amiram Eldar, Nov 14 2018 after Robert G. Wilson v at A089233 *)
-
PARI
a(n) = {my(d=divisors(n^2+1)); sum(k=2, #d, sum(j=2, k-1, gcd(d[k], d[j]) == 1));} \\ Michel Marcus, Nov 12 2018
Formula
a(n) = A089233(n^2+1). - Michel Marcus, Nov 13 2018
Comments