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.

A332867 a(n) = minimal positive k such that the concatenation of decimal digits 1,2,...,n is a divisor of the concatenation of n+1,n+2,...,n+k.

Original entry on oeis.org

1, 4, 20, 1834, 14995, 6986, 2888370, 795412, 37366487, 8803255100
Offset: 1

Views

Author

Scott R. Shannon, Feb 27 2020

Keywords

Comments

As with A332580 a heuristic argument, based on the divergent sum of reciprocals which approximates the probability that the concatenation of 1,2,...,n will divide the concatenation of n+1,n+2,...,n+k suggests that k should always exist. However an examination of the prime factors of the concatenation of 1,2,...,n shows that most of these numbers contain one or more very large primes, suggesting the values of k will likely become extremely large as n increases.
The author thanks Joseph Myers for suggestions for finding the larger terms of this sequence.

Examples

			a(2) = 4 as '1'||'2' = 12 and '3'||'4'||'5'||'6' = 3456, which is divisible by 12 (where '||' denotes decimal concatenation).
a(3) = 20 as '1'||'2'||'3' = 123 and '4'||'5'||...||'22'||'23' = 4567891011121314151617181920212223, which is divisible by 123.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local i, t, m; t, m:= parse(cat($1..n)), 0;
          for i from n+1 do m:= parse(cat(m,i)) mod t;
          if m=0 then break fi od; i-n
        end:
    seq(a(n), n=1..6);  # Alois P. Heinz, Feb 29 2020
  • PARI
    a(n) = {my(k=1, small="", big = n+1); for (j=1, n, small=concat(small, Str(j))); small = eval(small); while (big % small, k++; big = eval(concat(Str(big), Str(n+k)))); k;} \\ Michel Marcus, Feb 29 2020
    
  • Python
    def A332867(n):
        m, k = int(''.join(str(d) for d in range(1,n+1))), 1
        i = n+k
        i2, l = i % m, len(str(i))
        t = 10**l
        t2, r = t % m, i % m
        while r != 0:
            k += 1
            i += 1
            i2 = (i2+1) % m
            if i >= t:
                l += 1
                t *= 10
                t2 = (10*t2) % m
            r = (r*t2 + i2) % m
        return k # Chai Wah Wu, May 20 2020

A333687 a(n) is the minimal value of k >= 0, such that the concatenation of the decimal digits of n,n+1,...,n+k is divisible by the digit sum of the concatenation, or -1 if no such k is known.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 2, 42, 4, 3, 0, 1, 0, 0, 1, 17, 0, 131, 26, 0, 16, 11, 0, 1, 2, 37, 1, 1, 0, 1, 2, 21, 0, 3, 0, 7, 8, 0, 6, 83, 0, 1, 0, 89, 8, 26, 0, 97, 142783940, 3, 1, 1, 0, 4, 8, 0, 14, 37, 49994, 380, 20, 17, 0, 65, 0, 62, 1, 3, -1, 29, 46, 235, 0, 0, 18, 29, 0, 1, 53
Offset: 1

Views

Author

Scott R. Shannon, Apr 02 2020

Keywords

Comments

As with A332580 a heuristic argument based on the divergent sum of reciprocals which approximates the probability that the digit sum of the concatenation of n+1,n+2,...,n+k will divide the concatenation suggests that k should always exist. However in the first one thousand terms there are currently fourteen terms which are unknown and have a k value of at least 10^9. These are n = 76, 250, 273, 546, 585, 663, 695, 744, 749, 760, 790, 866, 867, 983. The largest known k value in this range is k = 600747353 for n = 693, which has a corresponding digit sum of 23123615211.
See the companion sequence A333830 for the corresponding digit sum for each value of n.
The author acknowledges Joseph Myers whose algorithm to find terms in A332580 was modified and used to find the large k values in this sequence.

Examples

			a(1) = 0 as 1 is divisible by its digit sum 1 so no concatenation of additional numbers is required. This is also true for n = 2 to 10.
a(11) = 2 as 11 requires the concatenation of two more numbers, 12 and 13, to form 111213, which is divisible by its digit sum 9.
a(12) = 0 as 12 is divisible by its digit sum 3.
a(16) = 4 as 16 requires the concatenation of four more numbers, 17,18,19 and 20, to form 1617181920, which is divisible by its digit sum 36.
		

Crossrefs

A333830 a(n) is the digit sum of the concatenation of the decimal digits of n,n+1,...,n+k, where k >= 0 and minimal, such that the concatenation is divisible by its digit sum, or -1 if no such sum is known.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 9, 3, 9, 18, 333, 36, 29, 9, 12, 2, 3, 9, 135, 6, 1218, 216, 9, 126, 90, 3, 9, 18, 355, 15, 17, 9, 21, 27, 198, 4, 26, 6, 75, 81, 9, 64, 810, 12, 18, 5, 855, 90, 297, 9, 936, 5050737477, 45, 27, 20, 6, 45, 99, 9, 174, 446, 1000260, 4209
Offset: 1

Views

Author

Scott R. Shannon, Apr 07 2020

Keywords

Comments

A heuristic argument, see the companion sequence A333687, suggests that the digit sum should always exist. Also see A333687 for the corresponding values of k for each digit sum and for details of the currently unknown terms.
The first escape value is a(76) = -1. - Georg Fischer, Jul 16 2020

Examples

			a(1) = 1 as the digit sum 1 divides 1 itself. Similarly a(2),...,a(9) equal 2,...,9 respectively.
a(10) = 1 as the digit sum of 10 is 1 which divides 10.
a(11) = 9 as A333687(11) = 2 giving the decimal concatenation 111213 which has a digit sum of 9.
a(16) = 36 as A333687(16) = 4 giving the decimal concatenation 1617181920 which has a digit sum of 36.
		

Crossrefs

Showing 1-3 of 3 results.