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.
%I A348177 #17 Oct 11 2021 13:22:01 %S A348177 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, %T A348177 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, %U A348177 31,1,31,31,3,5,11,47,3,15,3,15,47,7,31,383,1,3 %N 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. %C A348177 That is a generalization of a problem proposed by French site Diophante in link. %C A348177 Some results: %C A348177 x and y satisfy (x+1)*(y+1) = 2^n + 1. %C A348177 x and y are both even, so 2 <= x <= y < 2^n. %C A348177 There is only one case such that x = y, it is for n = 3 with x = y = 2 (Examples). %C A348177 a(n) = 0 iff 2^n+1 is Fermat prime (A019434), hence iff n = 1, 2, 4, 8, 16. %C A348177 a(n) = 1 iff 2^n+1 is semiprime (n is in A092559). %H A348177 Diophante, <a href="http://www.diophante.fr/problemes-par-themes/arithmetique-et-algebre/a4-equations-diophantiennes/4561-a4921-zero-une-mille-et-plus">A4921 - Zéro, une, mille et plus</a> (in French). %F A348177 For n<>3, the number of positive pairs solution (x,y) is a(n) = (tau(2^n+1) - 2)/2. %F A348177 For n = 3, there is only one pair solution and a(3) = (tau(2^3+1) - 1)/2 = 1, with (x, y) = (2, 2). %F A348177 a(n) = ceiling((tau(2^n+1) - 2)/2) = ceiling((A046798(n)-2)/2) is the general formula. %e A348177 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. %e A348177 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. %e A348177 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. %e A348177 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. %p A348177 with(numtheory): %p A348177 M := seq(ceil((tau(2^n+1)-2)/2), n=1..100); %t A348177 a[3] = 1; a[n_] := DivisorSigma[0, 2^n + 1]/2 - 1; Array[a, 80] (* _Amiram Eldar_, Oct 05 2021 *) %o A348177 (PARI) a(n) = ceil((numdiv(2^n+1) - 2)/2); \\ _Michel Marcus_, Oct 11 2021 %Y A348177 Cf. A046798, A092559, A019434. %K A348177 nonn %O A348177 1,9 %A A348177 _Bernard Schott_, Oct 05 2021