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 A259124 #34 Oct 16 2024 06:57:35 %S A259124 0,0,0,0,0,0,0,4,0,0,5,0,0,6,6,0,7,0,7,8,0,0,17,8,0,10,9,0,20,0,10,12, %T A259124 0,10,34,0,0,14,23,0,26,0,13,28,0,0,43,12,13,18,15,0,32,14,29,20,0,0, %U A259124 67,0,0,36,32,16,38,0,19,24,32,0,76,0,0,44,21,16,44,0,57,44 %N A259124 If n is representable as x*y+x+y, with x>=y>1, then a(n) is the sum of all x's and y's in all such representations. Otherwise a(n)=0. %C A259124 The sequence of numbers that never appear in a(n) begins: 1, 2, 3, 11, 27, 35, 51, 53, 79, 83, 89, 93, 117, 123, 125, 135, 143, 145. %C A259124 The indices n at which a(n)=0 are in A254636. - _Vincenzo Librandi_, Jul 16 2015 %H A259124 Charles R Greathouse IV, <a href="/A259124/b259124.txt">Table of n, a(n) for n = 1..10000</a> %F A259124 a(n) = Sum({d: d | n+1 and 3 <= d <= sqrt(n+1)}, d + (n+1)/d - 2). - _Robert Israel_, Aug 05 2015 %e A259124 11 = 3*2 + 3 + 2, so a(11)=5. %p A259124 f:= proc(n) local D,d; %p A259124 D:= select(t -> (t >= 3 and t^2 <= n+1), numtheory:-divisors(n+1)); %p A259124 add(d + (n+1)/d - 2, d = D); %p A259124 end proc: %p A259124 map(f, [$1..100]); # _Robert Israel_, Aug 05 2015 %t A259124 a[n_] := Sum[Boole[3 <= d <= Sqrt[n+1]] (d+(n+1)/d-2), {d, Divisors[n+1]}]; %t A259124 Array[a, 100] (* _Jean-François Alcover_, Jun 08 2020, after Maple *) %o A259124 (Python) %o A259124 TOP = 100 %o A259124 a = [0]*TOP %o A259124 for y in range(2, TOP//2): %o A259124 for x in range(y, TOP//2): %o A259124 n = x*y + x + y %o A259124 if n>=TOP: break %o A259124 a[n] += x+y %o A259124 print(a[1:]) %o A259124 (Python) %o A259124 from sympy import divisors %o A259124 def A259124(n): %o A259124 m, c = n+1, 0 %o A259124 for d in divisors(m): %o A259124 if d**2>m: %o A259124 break %o A259124 if d>=3: %o A259124 c += d+m//d-2 %o A259124 return c # _Chai Wah Wu_, Oct 15 2024 %o A259124 (PARI) a(n)=sum(y=2,sqrtint(n+1)-1, my(x=(n-y)/(y+1)); if(denominator(x)==1, x+y)) \\ _Charles R Greathouse IV_, Jun 29 2015 %Y A259124 Cf. A254636, A255361. %K A259124 nonn %O A259124 1,8 %A A259124 _Alex Ratushnyak_, Jun 18 2015