

A296447


Smallest integer N such that all numbers from 1 to n (n being N's rank in the sequence) can be built by the sum of contiguous digits of N.


1



1, 11, 12, 112, 113, 132, 1114, 1133, 1143, 11134, 11144, 11154, 11443, 111155, 111165, 111544, 111554, 256318, 1111555, 1111655, 1111665, 1115554, 1194332, 11111766, 11111776, 11116565, 11116665, 12337741, 12377441, 111116766, 111117676, 111117776, 111166665, 113777242, 123377741, 123777441
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

The 18th term (256318) is peculiar: it is the only one among the 43 first terms of the sequence that doesn't start with 1 and it is the only one having a digitsum (25) larger than its rank in the sequence (18).
Barry Schwarz has computed a(44) to a(59), the latter being the second term of the sequence not to start with 1; a(59) = 213388888552. Barry estimates that a(60) probably has at least 13 digits.


LINKS

JeanMarc Falcoz and Barry Schwarz, Table of n, a(n) for n = 1..59


EXAMPLE

The 18th term of the sequence is 256318. The 18 numbers from 1 to 18 can be built summing a certain set of contiguous digits of 256318: 1 is the digit 1; 2 is the digit 2; 3 is the digit 3; 4 is 3+1 (contiguous); 5 is the digit 5; 6 is the digit 6; 7 is 2+5 (contiguous); 8 is the digit 8; 9 is 6+3 (contiguous); 10 is 6+3+1 (contiguous); 11 is 5+6 (contiguous); 12 is 3+1+8 (contiguous); 13 is 2+5+6 (contiguous); 14 is 5+6+3 (contiguous); 15 is 5+6+3+1 (contiguous); 16 is 2+5+6+3 (contiguous); 17 is 2+5+6+3+1 (contiguous); 18 is 6+3+1+8 (contiguous).


MATHEMATICA

Array[With[{r = Range@ #}, SelectFirst[Range[10^6], SequenceCount[Union@ Map[Total, #] &@ Apply[Join, Table[Partition[#, i, 1], {i, Length@#}]] &@ IntegerDigits@ #, r] == 1 &]] &, 18] (* or *)
With[{s = Array[LengthWhile[#, # == 1 &] &@ Differences@ Union@ Map[Total, #] &@ Apply[Join, Table[Partition[#, i, 1], {i, Length@ #}]] &@ IntegerDigits@ # &, 10^6]}, SelectFirst[#, FreeQ[IntegerDigits@#, 0] &] & /@ Values@ PositionIndex@ s] (* Michael De Vlieger, Dec 13 2017 *)


CROSSREFS

Sequence in context: A096299 A110382 A095764 * A110380 A164854 A033047
Adjacent sequences: A296444 A296445 A296446 * A296448 A296449 A296450


KEYWORD

nonn,base,more


AUTHOR

Eric Angelini and JeanMarc Falcoz, Dec 13 2017


STATUS

approved



