A254671 Numbers that can be represented as x*y + x + y, where x >= y > 1.
8, 11, 14, 15, 17, 19, 20, 23, 24, 26, 27, 29, 31, 32, 34, 35, 38, 39, 41, 43, 44, 47, 48, 49, 50, 51, 53, 54, 55, 56, 59, 62, 63, 64, 65, 67, 68, 69, 71, 74, 75, 76, 77, 79, 80, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 97, 98, 99, 101, 103, 104, 107, 109, 110, 111, 113
Offset: 1
Keywords
Examples
14 = 2*4 + 2 + 4. 15 = 3*3 + 3 + 3. There is no way to express 16 in this form, so it is not in the sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Robert Israel, A254571 and A061743
Programs
-
Maple
filter:= proc(n) local t; if n::odd then numtheory:-tau(n+1) > 4 else not isprime(n+1) fi end proc: select(filter, [$1..200]); # Robert Israel, Nov 14 2024
-
Mathematica
sol[t_] := Solve[x >= y > 1 && x y + x + y == t, {x, y}, Integers]; Select[Range[200], sol[#] != {}&] (* Jean-François Alcover, Jul 28 2020 *)
-
Python
def aupto(limit): cands = range(2, limit//3+1) nums = [x*y+x+y for i, y in enumerate(cands) for x in cands[i:]] return sorted(set(k for k in nums if k <= limit)) print(aupto(113)) # Michael S. Branicky, Aug 11 2021
-
Python
from sympy import primepi def A254671(n): def f(x): return int(n+(x>=7)+primepi(x+1)+primepi(x+1>>1)) m, k = n, f(n) while m != k: m, k = k, f(k) return m # Chai Wah Wu, Oct 14 2024
Comments