A069863 a(n) is the shortest concatenation of two or more decreasing consecutive numbers (n)(n-1)...(0) such that n divides a(n), or n if there is no such concatenation.
10, 210, 321, 432, 543210, 654, 7, 8765432, 987654321, 109876543210, 11, 1211109876, 13, 14131211109876, 151413121110, 1615141312, 171615, 181716151413121110, 19181716, 20, 21, 2221201918171615141312, 23
Offset: 1
Examples
a(7) = 7 the corresponding k = 0, a(2) =210, k=2. a(4) = 432, k = 2.
Programs
-
Mathematica
f[n_] := Block[{j = n, k = n - 1}, While[j = ToExpression[ StringJoin[ ToString[j], ToString[k]]]; !IntegerQ[j/n] && k > -1, k-- ]; If[k == -1, Return[n], Return[j]]]; Table[f[n], {n, 1, 30}]
Extensions
Edited by Robert G. Wilson v, Apr 22 2002
Edited by T. D. Noe, Apr 09 2009
Comments