OFFSET
1,2
FORMULA
a(p) = (p^2 - 3*p + 8)/2 for primes p. - Wesley Ivan Hurt, Nov 28 2021
EXAMPLE
a(5) = 9; There are 9 positive integer pairs (s,t), with s <= t such that both s and t divide 5 or both do not. They are (1,1), (1,5), (2,2), (2,3), (2,4), (3,3), (3,4), (4,4), (5,5).
MAPLE
a:= n-> add(add(`if`(irem(n, j)>0 xor irem(n, i)=0, 1, 0), i=1..j), j=1..n):
seq(a(n), n=1..57); # Alois P. Heinz, Nov 15 2021
PROG
(Python)
from sympy import divisor_count
def A349360(n):
m = divisor_count(n)
return m*(m-n) + n*(n+1)//2 # Chai Wah Wu, Nov 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Nov 15 2021
STATUS
approved