A281232 Numbers k such that k+2 divides concat(k, k+1).
1, 5, 65, 665, 6665, 66665, 666665, 2857141, 6666665, 66666665, 666666665, 1052631577, 6666666665, 66666666665, 666666666665, 2857142857141, 6666666666665, 11764705882351, 66666666666665, 666666666666665, 6666666666666665, 66666666666666665, 666666666666666665
Offset: 1
Examples
concat(2857141, 2857142) / 2857143 = 28571412857142 / 2857143 = 9999994.
Programs
-
Maple
with(numtheory): P:=proc(q) local c,n; for n from 1 to q do c:=n*10^(ilog10(n+1)+1)+n+1; if type(c/(n+2),integer) then print(n); fi; od; end: P(10^9);
-
Mathematica
Select[Range[10^7], Divisible[FromDigits@ Flatten@ Map[IntegerDigits, {#, # + 1}], # + 2] &] (* Michael De Vlieger, Jan 19 2017 *)
-
PARI
isok(n) = !(eval(Str(n, n+1)) % (n+2)); \\ Michel Marcus, Oct 09 2018
Formula
a(n) = A088797(n) - 2. - Alois P. Heinz, Jan 19 2017
Extensions
More terms from Alois P. Heinz, Jan 19 2017
Comments