cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A088797 Numbers n > 2 such that n divides the concatenation of n-2 and n-1.

Original entry on oeis.org

3, 7, 67, 667, 6667, 66667, 666667, 2857143, 6666667, 66666667, 666666667, 1052631579, 6666666667, 66666666667, 666666666667, 2857142857143, 6666666666667, 11764705882353, 66666666666667, 666666666666667
Offset: 1

Views

Author

Chuck Seggelin, Oct 18 2003

Keywords

Comments

For a 10-digit number, the difference between cat((n+2),(n+1)) and cat((n-2),(n-1)) is 40000000002 (as long as n-2 to n+2 are all numbers with the same number of digits). This difference has only 3 divisors which are ten digits long (1052631579, 2105263158 and 6666666667) of which two belong to the sequence. As 40000000002 has no other 10-digit factors, it is necessary to consider 11-digit numbers to obtain more terms.
From Robert G. Wilson v, Oct 21 2003, Oct 28 2003, Sep 23 2015 & Oct 24 2015: (Start)
All numbers of the forms
2(10^n-1)/3 + 1,
floor(2(10^(6n + 1) - 1)/7 + 1),
floor(2(10^(16n - 2) - 1)/17 + 1), and
floor(2(10^(18n - 8) - 1)/19 + 1), for n > 0 are members.
The only term not one of the above forms so far is 3. But it is included when n=0 for the second form.
(End)
If numbers less than 3 are acceptable, then an argument could be made that 1 is a terms since cat(n-2,n-1) is -10 which is == 0 (mod 1). - Robert G. Wilson v, Sep 29 2015
From Robert Israel, Oct 18 2015: (Start)
Numbers n of the form (2*10^m + 1)/k where k = 3, or k = 7 and m == 1 mod 6, or k = 17 and m == 14 mod 16, or k = 19 and m == 10 mod 18.
This is because n | (n-2)*10^m + (n-1) iff n | 2*10^m + 1.
But since we need 10^m >= n > 10^(m-1), 2*10^m+1 = k*n where 3 <= k <= 20.
The only numbers in that range that ever divide 2*10^m+1 are 3,7,17,19. (End)

Examples

			a(2)=7 because (7-2) concatenated with (7-1) yields 56 and 7 is a divisor of 56.
a(4)=667 because 667 is a divisor of 665666.
.
		

Crossrefs

Programs

  • Maple
    M:= 20: # to get all terms with <= M digits
    select(type, [seq(seq((2*10^m+1)/k, k=[19,17,7,3]),m=1..M)],integer); # Robert Israel, Oct 18 2015
  • Mathematica
    Select[ Range[8250000000], Mod[ FromDigits[ Join[ IntegerDigits[ # - 2], IntegerDigits[ # - 1]]], # ] == 0 &]
    fQ[n_] := Mod[ FromDigits[ Join[ IntegerDigits[n - 2], IntegerDigits[n - 1]]], n] == 0; k = 1; lst = {}; Select[ Flatten@ Table[ Select[ Divisors[4*10^n + 2], 10^(n - 1) < # < 10^n &], {n, 15}], fQ] (* Robert G. Wilson v, Sep 05 2015 *)
  • PARI
    for(n=3, 1e6, if((k=eval(Str(n-2,n-1))) && k % n == 0, print1(n", "))) \\ Altug Alkan, Sep 25 2015

Extensions

Extended by Robert G. Wilson v, Oct 21 2003
Further terms from Chuck Seggelin, Oct 29 2003