Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Lexicographically earliest sequence of integers with property that if a vertical line is drawn between any pair of adjacent digits, the number Z formed by the digits to the left of the line is divisible by the digit to the right of the line.
3

%I #53 Jul 15 2014 16:25:25

%S 1,11,3,7,71,31,111,113,33,117,77,13,37,711,1111,19,9,91,1117,73,311,

%T 131,1131,1133,93,331,11111,39,99,97,119,333,911,133,931,1139,771,337,

%U 713,339,933,391,1137,773,1113,991,11171,3111,777,3311,79,17,191,171,11311,137,719,993

%N Lexicographically earliest sequence of integers with property that if a vertical line is drawn between any pair of adjacent digits, the number Z formed by the digits to the left of the line is divisible by the digit to the right of the line.

%C "Lexicographically earliest" means in the sense of a sequence of integers, not digits.

%C No digit can be even or five. - _Hans Havermann_, Jul 02 2014 [Proof: if not, let d be the first digit in the sequence that is even or 5, and let Z be the concatenation of all earlier digits. But then Z is odd and does not end in 5, so is not divisible by d. Contradiction. - _N. J. A. Sloane_, Jul 03 2014] So any term must have only the odd digits {1, 3, 7, 9} (see A136333). - _Robert G. Wilson v_, Jul 02 2014

%C We choose the next term, a(n), to be the minimal number not already in the sequence such that the property "if a vertical line is drawn between any pair of adjacent digits, the number Z formed by the digits to the left of the line is divisible by the first digit following Z" holds.

%C So even if Z is prime, the next term can start with a 1.

%C So if Z is divisible by any d in {2,3,...,9} the next term can start with 1 or d, otherwise it must start with 1.

%C This sequence is missing A136333 terms 313, 319, 373, 379, 717, 737, 797, 913, 919, 939, 973, 979, 1313, ... The earliest occurrences of n-digit numbers are the repunits at indices 1, 2, 7, 15, 27, 97, 372, 939, 2164, 4781, 10851, 22779, 47056, ... The latest n-digit numbers and their indices are: (9,17), (17,52), (397,290), (1917,867), (19317,2003), (199117,7241), (1999117,17953), (19999997,44173), ... - _Hans Havermann_, Jul 04 2014, Jul 07 2014, Jul 15 2014

%D Eric Angelini, Posting to Sequence Fans Mailing List, Jun 26 2014

%H Robert G. Wilson v and Hans Havermann (Robert G. Wilson v to 1000), <a href="/A244471/b244471.txt">Table of n, a(n) for n = 1..10850</a>

%e After 1,11,3,7, let a(5) = x be the next term. Now 11137 = 7*37*43, so x must begin with 1 or 7. The candidates for x are therefore 12,13,...,19,71,72,,...,79,111,...

%e If x=12, we would get 1 11 3 7 12 ... but Z = 11371 is prime and is not divisible by 2, ..., 9. So x is not 12, ...,19. The next candidate is x=71, and this works. So a(5)=71.

%t r=f=e={1,3,7,9};Do[e=10*e;f=Flatten[Table[e[[i]]+f,{i,4}]];r=Join[r,f],{9}];r=Select[r,Intersection[Partition[IntegerDigits[#],3,1],IntegerDigits[{313,319,373,379,717,737,797,913,919,939,973,979}]]=={}&];t=0;Do[c=1;While[d=IntegerDigits[r[[c]]];Union[Table[IntegerQ[(10^i*t+FromDigits[Take[d,i]])/d[[i+1]]],{i,0,Length[d]-1}]]!={True},c++];Print[r[[c]]];t=10^Length[d]*t+r[[c]];r=Delete[r,c],{10850}] (* _Hans Havermann_, Jul 04 2014 *)

%Y A sister sequence to A243357 and A244496. A subsequence of A136333.

%K nonn,base

%O 1,2

%A _N. J. A. Sloane_, Jul 02 2014

%E Corrected and extended by _Hans Havermann_, Jul 02 2014