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.

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.

This page as a plain text file.
%I A332867 #31 Apr 25 2021 13:11:43
%S A332867 1,4,20,1834,14995,6986,2888370,795412,37366487,8803255100
%N 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.
%C A332867 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.
%C A332867 The author thanks _Joseph Myers_ for suggestions for finding the larger terms of this sequence.
%H A332867 J. S. Myers, R. Schroeppel, S. R. Shannon, N. J. A. Sloane, and P. Zimmermann, <a href="http://arxiv.org/abs/2004.14000">Three Cousins of Recaman's Sequence</a>, arXiv:2004:14000 [math.NT], April 2020.
%e A332867 a(2) = 4 as '1'||'2' = 12 and '3'||'4'||'5'||'6' = 3456, which is divisible by 12 (where '||' denotes decimal concatenation).
%e A332867 a(3) = 20 as '1'||'2'||'3' = 123 and '4'||'5'||...||'22'||'23' = 4567891011121314151617181920212223, which is divisible by 123.
%p A332867 a:= proc(n) local i, t, m; t, m:= parse(cat($1..n)), 0;
%p A332867       for i from n+1 do m:= parse(cat(m,i)) mod t;
%p A332867       if m=0 then break fi od; i-n
%p A332867     end:
%p A332867 seq(a(n), n=1..6);  # _Alois P. Heinz_, Feb 29 2020
%o A332867 (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
%o A332867 (Python)
%o A332867 def A332867(n):
%o A332867     m, k = int(''.join(str(d) for d in range(1,n+1))), 1
%o A332867     i = n+k
%o A332867     i2, l = i % m, len(str(i))
%o A332867     t = 10**l
%o A332867     t2, r = t % m, i % m
%o A332867     while r != 0:
%o A332867         k += 1
%o A332867         i += 1
%o A332867         i2 = (i2+1) % m
%o A332867         if i >= t:
%o A332867             l += 1
%o A332867             t *= 10
%o A332867             t2 = (10*t2) % m
%o A332867         r = (r*t2 + i2) % m
%o A332867     return k # _Chai Wah Wu_, May 20 2020
%Y A332867 Cf. A332580, A332830, A007908.
%K A332867 nonn,base,more,hard
%O A332867 1,2
%A A332867 _Scott R. Shannon_, Feb 27 2020