Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #36 Nov 29 2024 19:07:57
%S 8,11,14,15,17,19,20,23,24,26,27,29,31,32,34,35,38,39,41,43,44,47,48,
%T 49,50,51,53,54,55,56,59,62,63,64,65,67,68,69,71,74,75,76,77,79,80,83,
%U 84,86,87,89,90,91,92,94,95,97,98,99,101,103,104,107,109,110,111,113
%N Numbers that can be represented as x*y + x + y, where x >= y > 1.
%C Apparently 8 and the elements of A061743. - _R. J. Mathar_, Feb 19 2015
%C This is true. For proof, see link.
%C As x*y + x + y = (x + 1)*(y + 1) - 1 where x >= y > 1 we have k = a(n) is in the sequence if and only if k + 1 is an odd composite or k + 1 is an even number with more than 4 divisors. - _David A. Corneth_, Oct 15 2024
%H Robert Israel, <a href="/A254671/b254671.txt">Table of n, a(n) for n = 1..10000</a>
%H Robert Israel, <a href="/A254671/a254671.pdf">A254571 and A061743</a>
%e 14 = 2*4 + 2 + 4.
%e 15 = 3*3 + 3 + 3.
%e There is no way to express 16 in this form, so it is not in the sequence.
%p filter:= proc(n) local t;
%p if n::odd then numtheory:-tau(n+1) > 4 else not isprime(n+1) fi
%p end proc:
%p select(filter, [$1..200]); # _Robert Israel_, Nov 14 2024
%t sol[t_] := Solve[x >= y > 1 && x y + x + y == t, {x, y}, Integers];
%t Select[Range[200], sol[#] != {}&] (* _Jean-François Alcover_, Jul 28 2020 *)
%o (Python)
%o def aupto(limit):
%o cands = range(2, limit//3+1)
%o nums = [x*y+x+y for i, y in enumerate(cands) for x in cands[i:]]
%o return sorted(set(k for k in nums if k <= limit))
%o print(aupto(113)) # _Michael S. Branicky_, Aug 11 2021
%o (Python)
%o from sympy import primepi
%o def A254671(n):
%o def f(x): return int(n+(x>=7)+primepi(x+1)+primepi(x+1>>1))
%o m, k = n, f(n)
%o while m != k: m, k = k, f(k)
%o return m # _Chai Wah Wu_, Oct 14 2024
%Y Cf. A071904, A254636 is the complement.
%K nonn
%O 1,1
%A _Alex Ratushnyak_, Feb 04 2015