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!)
A249647 Numbers n that divide the concatenation of n+1 and n-1. 2
1, 3, 9, 11, 33, 99, 111, 333, 999, 1111, 3333, 9999, 11111, 33333, 99999, 111111, 142857, 333333, 999999, 1111111, 3333333, 9999999, 11111111, 33333333, 99999999, 111111111 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A069871 is a subset of this sequence.
All the numbers of the form (10^k - 1)/9, (10^k - 1)/3 and (10^k-1) are members.
Any concatenation of 142857 with itself is part of the sequence, too.
All integers of the form (10^d-1)/k where 1 <= k <= 9. - Robert Israel, Jan 06 2016
It appears that equivalent definitions are: (A) Numbers which divide the repunit of the same length, n | R(length(n)). (B) Numbers equal to one or more concatenations of one among {1, 3, 9, 142857}. Is there a proof for this? - M. F. Hasler, Jun 10 2016
LINKS
FORMULA
a(n) = 1000001*a(n-19) + 1000000*a(n-38). - Robert Israel, Jan 06 2016
EXAMPLE
3 belongs to this sequence as 3 divides 42, 11 belongs to this sequence as 11 divides 1210.
9 belongs to this sequence as 9 divides the concatenation of 10 and 8, i.e., 108.
MAPLE
with(numtheory): P:=proc(q) local n;
for n from 1 to q do if type(((n+1)*10^(ilog10(n-1)+1)+n-1)/n, integer) then print(n);
fi; od; end: P(10^15);
# alternative:
seq(op(select(type, [seq((10^d-1)/k, k=[9, 7, 3, 1])], integer)), d=1..20); # Robert Israel, Jan 06 2016
MATHEMATICA
Select[Range[2, 10^7], Divisible[FromDigits[IntegerDigits[# + 1]~Join~IntegerDigits[# - 1]], #] &] (* Michael De Vlieger, Jan 06 2016 *)
PROG
(PARI) for(n=1, 10^8, s=concat(Str(n+1), Str(n-1)); if(!(eval(s)%n), print1(n, ", "))) \\ Derek Orr, Nov 03 2014
CROSSREFS
Cf. A069871.
Sequence in context: A057245 A226477 A027894 * A004668 A239661 A106305
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Nov 03 2014
EXTENSIONS
a(23)-a(25) from Derek Orr, 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 May 5 07:59 EDT 2024. Contains 372257 sequences. (Running on oeis4.)