OFFSET
1,1
COMMENTS
This sequence gives one half of the row lengths of the irregular triangle A329587.
For the number of representative solutions of this congruence for all positive moduli m and vanishing a*b see A329586.
The formula for the number of representative solutions a(n), with modulus m = m(n), given in A329587, can be found from the number of all such solutions for m = m(n) given in A227091 after subtracting the number of solutions with a*b = 0 given in A329586. For odd m = m(n) this is S(m) = 2^(r1(m) +r3(m))*(2^r1(m) - 1) - delta(r3(m), 0)*2^(r1(m)), with r1(m) and r3(m) the number of distinct primes 1 (mod 4) and 3 (mod 4) in the prime number factorization of m respectively, and delta is the Kronecker symbol. For even m this is S(m) = 2^(r1(m) + r3(m))*(2^(1+r1(m)) - 1) - delta(r3(m), 0)*2^(r1(m)) if m/2 is odd (e2 = 1), and otherwise S(m) = 2^(r2(e2(m)) + r1(m) + r3(m))*(2^(1 + r1(m) + r3(m)) - 1), with r2(e2(m)) = 1 or 2 if e2(m) = 2 or >= 3, if m/2^(e2(m)) is odd.
FORMULA
EXAMPLE
n = 1, m = 4: a(1) = S(4) = 2^1 *(2^1 - 1) = 2.
n = 2, m = 6 = 2*3: a(2) = S(6) = 2^(0+1)*(2^1 - 1) - 0 = 2.
n = 3, m = 8 = 2^3: a(3) = S(8) = 2^2*(2^1 - 1) = 4.
n = 4, m = 10 = 2*5: a(4) = S(10) = 2^(1+0)*(2^(1+1) -1) - 2^1 = 2*3 - 2 = 4.
n = 10, m = 20 = 2^2*5: a(10) = S(20) = 2^(1+1+0)*(2^(1+1+0) - 1) = 4*3 = 12.
n = 15, m = 30 = 2*3*5: a(15) = S(30) = 2^(1+1)*(2^(1+1) - 1) - 0 = 4*3 = 12.
CROSSREFS
KEYWORD
nonn
AUTHOR
Wolfdieter Lang, Dec 14 2019
STATUS
approved