login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1

%I #38 Jun 20 2019 03:04:10

%S 123,234,345,456,8910,101112,230231232

%N 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.

%C 012 is not included because leading 0's are not allowed.

%C From _Charlie Neder_, Jun 05 2019: (Start)

%C If x = 10^k - 2, then x|x+1|x+2 (with | denoting concatenation) will be congruent to 22 modulo x, -9 modulo x+1, and 0 modulo x+2.

%C If x = 10^k - 1, then x|x+1|x+2 will be congruent to 12 modulo x and 1 modulo x+1.

%C Therefore, the only term such that x and x+2 have different lengths is 8910.

%C By reducing modulo x + {0,1,2} it can be shown that if at least two of x|10^k+2, x+1|10^2k-1, and x+2|2*10^2k-10^k are true - presuming x and x+2 are the same length - then x|x+1|x+2 is in this sequence. No further terms corresponding to x < 10^18. (End)

%C No further terms corresponding to x < 10^50. - _Chai Wah Wu_, Jun 19 2019

%e 230231232 is the concatenation of 230, 231 and 232 and is divisible by 231 and 232.

%p cat3:= proc(x)

%p local t;

%p t:= 10^length(x+2);

%p x*(1 + t*(1+10^length(x+1)))+t+2

%p end proc:

%p f:= proc(x) local q,a,b;

%p q:= cat3(x);

%p a:= (q/x)::integer;

%p b:= (q/(x+1))::integer;

%p if a and b then return q elif not(a) and not(b) then return NULL fi;

%p if (q/(x+2))::integer then q else NULL fi

%p end proc:

%p map(f, [$1..1000]);

%o (Python)

%o for k in range(1,8):

%o ..for x in range(10**(k-1),10**k-2): # will not find 8910

%o ....if sum([not (10**k+2)%x,not (10**(2*k)-1)%(x+1),\

%o ....not (2*10**(2*k)+10**k)%(x+2)]) >= 2:

%o ......print(str(x)+str(x+1)+str(x+2)) # _Charlie Neder_, Jun 05 2019

%Y Subsequence of A001703.

%Y Cf. A308527.

%K nonn,base,more

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Jun 03 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)