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.

Showing 1-3 of 3 results.

A069860 Numbers n that divide the concatenation of n+1 and n+2.

Original entry on oeis.org

1, 2, 3, 4, 6, 17, 34, 51, 167, 334, 501, 1667, 3334, 5001, 14286, 16667, 33334, 50001, 166667, 333334, 500001, 1666667, 3333334, 5000001, 16666667, 33333334, 50000001, 166666667, 333333334, 500000001, 1666666667, 3333333334
Offset: 1

Views

Author

Amarnath Murthy, Apr 18 2002

Keywords

Examples

			17 divides 1819 hence is a member.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[10^7], Mod[ FromDigits[ Join[ IntegerDigits[ # + 1], IntegerDigits[ # + 2]]], # ] == 0 & ]

Formula

For k > 0, sequence contains (10^k+2)/2, (10^k+2)/3, (10^k+2)/6 and (10^(6k-1)+2)/7. The only other terms are 1 and 3. - David Wasserman, Aug 25 2005

Extensions

Edited and extended by Robert G. Wilson v, Apr 22 2002
More terms from David Wasserman, Aug 25 2005

A069862 Smallest k such that n divides the concatenation of numbers from (n+1) to (n+k), where (n+1) is on the most significant side.

Original entry on oeis.org

1, 2, 2, 2, 5, 2, 9, 4, 8, 10, 10, 8, 22, 16, 5, 4, 2, 8, 3, 20, 20, 10, 17, 12, 25, 22, 26, 16, 25, 20, 110, 20, 11, 2, 20, 8, 998, 52, 38, 20, 60, 20, 4, 32, 35, 42, 50, 20, 96, 50, 2, 96, 93, 26, 10, 20, 3, 50, 44, 20, 46, 40, 45, 40, 50, 32, 86, 32, 17, 20, 75, 72, 26, 926, 50
Offset: 1

Views

Author

Amarnath Murthy, Apr 18 2002

Keywords

Comments

Minimum number of consecutive subsequent integers after n that must be concatenated together in ascending order such that n divides the concatenated term.
Concatenation always begins at n+1. Note that multiples of 11 seems to require more terms than any other number. 385 requires 9860. 451 requires 100270 terms be concatenated together into a 495,000 digit number. - Chuck Seggelin, Oct 29 2003; corrected by Chai Wah Wu, Oct 19 2014

Examples

			a(7) = 9 as 7 divides 8910111213141516 the concatenation of numbers from 8(= 7+1) to 16 (= 7+9).
a(5) = 5 because 5 will divide the number formed by concatenating the 5 integers after 5 in ascending order (i.e. 678910). a(385) = 9860 because 385 will divide the concatenation of 386,387,388,...,10245.
		

Crossrefs

Programs

  • Maple
    c[1] := 1:for n from 2 to 172 do k := 1:g := (n+k) mod n:while(true) do k := k+1:b := convert(n+k,base,10):g := (g*10^nops(b)+n+k) mod n: if((g mod n)=0) then c[n] := k:break:fi:od:od:seq(c[l],l=1..172);
  • Mathematica
    f[n_] := Block[{k = n + 1}, d = k; While[ !IntegerQ[d/n], k++; d = d*10^Floor[Log[10, k] + 1] + k]; k - n]; Table[ f[n], {n, 1, 75}] (* Robert G. Wilson v, Nov 04 2003 *)
  • Python
    def A069862(n):
        nk, kr, r = n+1, 1, 1 if n > 1 else 0
        while r:
            nk += 1
            kr = (kr + 1) % n
            r = (r*(10**len(str(nk)) % n)+kr) % n
        return nk-n # Chai Wah Wu, Oct 20 2014

Extensions

More terms from Sascha Kurz, Jan 28 2003

A069863 a(n) is the shortest concatenation of two or more decreasing consecutive numbers (n)(n-1)...(0) such that n divides a(n), or n if there is no such concatenation.

Original entry on oeis.org

10, 210, 321, 432, 543210, 654, 7, 8765432, 987654321, 109876543210, 11, 1211109876, 13, 14131211109876, 151413121110, 1615141312, 171615, 181716151413121110, 19181716, 20, 21, 2221201918171615141312, 23
Offset: 1

Views

Author

Amarnath Murthy, Apr 18 2002

Keywords

Comments

a(n) = n for the following values of n: 7, 11, 13, 20, 21, 23, 25, 26, 29, 31, 37, 38, 39, 50, 52, 53, 58, 59, 62, 63, 65, 67, 71, 74, 81, 82, 85, 89, 91, 92, 95, 97, 100, 101, 106, 115, 116, 118, 130, 133, 145, 146, 152, 159, 169, 173, 175, 178, 182, 184, 185, 195, 196, 200, 212, 213, 214, 215, 217, 220, 221, 224, 227, 229, 230, 232, 235, 236, 239, 243, 250, ...

Examples

			a(7) = 7 the corresponding k = 0, a(2) =210, k=2. a(4) = 432, k = 2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{j = n, k = n - 1}, While[j = ToExpression[ StringJoin[ ToString[j], ToString[k]]]; !IntegerQ[j/n] && k > -1, k-- ]; If[k == -1, Return[n], Return[j]]]; Table[f[n], {n, 1, 30}]

Extensions

Edited by Robert G. Wilson v, Apr 22 2002
Edited by T. D. Noe, Apr 09 2009
Showing 1-3 of 3 results.