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!)
A069871 Numbers m that divide the concatenation of m-1 and m+1. 9
3, 9, 11, 33, 111, 333, 1111, 3333, 11111, 33333, 111111, 142857, 333333, 1111111, 3333333, 11111111, 33333333, 111111111, 333333333, 1111111111, 3333333333, 11111111111, 33333333333, 111111111111, 142857142857, 333333333333, 1111111111111 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
All the numbers of the form (10^k - 1)/3 and (10^k - 1)/9 are terms.
These (i.e., (10^k - 1)/3 for k >= 1, (10^k - 1)/9 for k >= 2, and (10^(6*k) - 1)/7 for k >= 1) are all the terms of the sequence, apart from 9. This is because if 10^(i-1) <= x+1 < 10^i, x | 10^i*(x-1) + x + 1 iff x | 10^i - 1, and then 1 < d = (10^i - 1)/x <= (10^i - 1)/(10^(i-1)-1) < 10. Since 2,4,5,6,8 can't divide 10^i-1, d must be 3, 7 or 9. - Robert Israel, Nov 04 2014
The terms of the sequence satisfy the condition that both m-1 and m+1 must be greater than 0. If m-1=0 were admitted then 1 would also be part of the sequence. - Michel Marcus, Nov 05 2014
LINKS
FORMULA
From Robert Israel, Nov 04 2014: (Start)
a(1+2*j + 13*k) = (10^(1+j+6*k)-1)/9, j=0..5, k >= 0 (except for j=k=0).
a(2*j + 13*k) = (10^(j+6*k)-1)/3, j=0..5, k >= 0 (except for j=k=0 and j=1,k=0).
a(13*k - 1) = (10^(6*k)-1)/7, k >= 1.
(End)
EXAMPLE
3 belongs to this sequence since 3 divides 24; 11 belongs to this sequence since 11 divides 1012.
9 belongs to this sequence since 9 divides the concatenation of 8 and 10, i.e., 810.
142857 belongs to this sequence since 142857 divides the concatenation of 142856 and 142858, i.e., 142856142858/142857 = 999994.
MAPLE
N:= 10: # to get all terms with at most N digits
3, 9, seq(seq((10^k-1)/d, d = `if`(k mod 6 = 0, [9, 7, 3], [9, 3])), k = 2 .. N); # Robert Israel, Nov 04 2014
MATHEMATICA
Select[ Range[10^8], Mod[ FromDigits[ Join[ IntegerDigits[ # - 1], IntegerDigits[ # + 1]]], # ] == 0 & ]
PROG
(PARI) isok(n) = eval(concat(Str(n-1), Str(n+1))) % n == 0; \\ Michel Marcus, Nov 04 2014
CROSSREFS
Cf. A077192.
Sequence in context: A106305 A135365 A088877 * A061957 A136984 A168400
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Apr 24 2002
EXTENSIONS
More terms from Sascha Kurz, Feb 10 2003
Missing a(12) added by Paolo P. Lava and missing a(25) added by Alois P. Heinz, Nov 03 2014
STATUS
approved

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 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)