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.

A331788 a(n) is the smallest m such that for any N, at least one of S(N), S(N+1), ..., S(N+m-1) is divisible by n, where S(N) is the sum of digits of N.

This page as a plain text file.
%I A331788 #19 Feb 01 2020 12:08:27
%S A331788 1,3,3,7,9,9,13,15,9,19,39,39,79,99,99,139,159,99,199,399,399,799,999,
%T A331788 999,1399,1599,999,1999,3999,3999,7999,9999,9999,13999,15999,9999,
%U A331788 19999,39999,39999,79999,99999,99999,139999,159999,99999,199999,399999,399999,799999
%N A331788 a(n) is the smallest m such that for any N, at least one of S(N), S(N+1), ..., S(N+m-1) is divisible by n, where S(N) is the sum of digits of N.
%C A331788 The main sequence is A331786; this is added because some people may search for this.
%H A331788 Jianing Song, <a href="/A331788/b331788.txt">Table of n, a(n) for n = 1..1000</a>
%H A331788 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,10,-10).
%F A331788 If n = 9*s + t, 1 <= t <= 9, then a(n) = 10^s*(2*t-gcd(t,9)+1) - 1. See A331787 for a proof of the formula in base b.
%F A331788 a(n) = A331786(n) + 1.
%F A331788 Conjectures from _Colin Barker_, Jan 26 2020: (Start)
%F A331788 G.f.: x*(1 + 2*x + 4*x^3 + 2*x^4 + 4*x^6 + 2*x^7 - 6*x^8) / ((1 - x)*(1 - 10*x^9)).
%F A331788 a(n) = a(n-1) + 10*a(n-9) - 10*a(n-10) for n>10.
%F A331788 (End) [This conjecture is correct.]
%F A331788 a(n) = O(10^(n/9)).
%e A331788 See A331786.
%o A331788 (PARI) a(n) = my(s=(n-1)\9, t=(n-1)%9+1); 10^s*(2*t-gcd(t,9)+1)-1
%Y A331788 Cf. A007953 (S(N)), A051885, A331786.
%Y A331788 Row 10 of A331789.
%K A331788 nonn,base,easy
%O A331788 1,2
%A A331788 _Jianing Song_, Jan 25 2020