A306643 Numbers that, for some x, are the concatenation of x, x+1 and x+2 and are divisible by at least two of x, x+1 and x+2.
123, 234, 345, 456, 8910, 101112, 230231232
Offset: 1
Examples
230231232 is the concatenation of 230, 231 and 232 and is divisible by 231 and 232.
Programs
-
Maple
cat3:= proc(x) local t; t:= 10^length(x+2); x*(1 + t*(1+10^length(x+1)))+t+2 end proc: f:= proc(x) local q,a,b; q:= cat3(x); a:= (q/x)::integer; b:= (q/(x+1))::integer; if a and b then return q elif not(a) and not(b) then return NULL fi; if (q/(x+2))::integer then q else NULL fi end proc: map(f, [$1..1000]);
-
Python
for k in range(1,8): for x in range(10**(k-1),10**k-2): # will not find 8910 if sum([not (10**k+2)%x,not (10**(2*k)-1)%(x+1),\ not (2*10**(2*k)+10**k)%(x+2)]) >= 2: print(str(x)+str(x+1)+str(x+2)) # Charlie Neder, Jun 05 2019
Comments