A348177 a(n) is the number of pair of positive integers (x, y) with 1 <= x <= y such that sum s = x + y and product p = x * y satisfy s + p = 2^n, with n > 0.
0, 0, 1, 0, 1, 1, 1, 0, 3, 2, 1, 1, 1, 3, 5, 0, 1, 7, 1, 1, 5, 3, 1, 3, 7, 7, 9, 1, 3, 23, 1, 1, 11, 7, 15, 7, 3, 7, 5, 1, 3, 31, 1, 3, 31, 15, 3, 3, 3, 31, 23, 3, 3, 31, 23, 3, 11, 3, 7, 7, 1, 15, 31, 1, 31, 31, 3, 5, 11, 47, 3, 15, 3, 15, 47, 7, 31, 383, 1, 3
Offset: 1
Keywords
Examples
For n = 3, only (x=y=2) satisfy s = 2+2 = 4, p = 2*2 = 4 and s+p = 8 = 2^3, hence a(3) = 1. For n = 6, only (x=4, y=12) satisfy s = 4+12 = 16, p = 4*12 = 48 and s+p = 64 = 2^6 hence a(6) = 1. For n = 9, (2,170), (8,56), (18,26) are the 3 solutions, with 172+340=512=2^9, 64+448=512, 44+468=512, hence a(9) = 3. For n = 10, (4, 204) and (24, 40) are the 2 solutions, with 208+816=1024=2^10 and 64+960=1024, hence a(10) = 2.
Links
- Diophante, A4921 - Zéro, une, mille et plus (in French).
Programs
-
Maple
with(numtheory): M := seq(ceil((tau(2^n+1)-2)/2), n=1..100);
-
Mathematica
a[3] = 1; a[n_] := DivisorSigma[0, 2^n + 1]/2 - 1; Array[a, 80] (* Amiram Eldar, Oct 05 2021 *)
-
PARI
a(n) = ceil((numdiv(2^n+1) - 2)/2); \\ Michel Marcus, Oct 11 2021
Formula
For n<>3, the number of positive pairs solution (x,y) is a(n) = (tau(2^n+1) - 2)/2.
For n = 3, there is only one pair solution and a(3) = (tau(2^3+1) - 1)/2 = 1, with (x, y) = (2, 2).
a(n) = ceiling((tau(2^n+1) - 2)/2) = ceiling((A046798(n)-2)/2) is the general formula.
Comments