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-5 of 5 results.

A352688 a(n) is the least term of the first run of A331786(n) consecutive numbers whose sum of digits (A007953) is not divisible by n.

Original entry on oeis.org

9, 1, 997, 6, 7, 994, 9999993, 1, 1, 999981, 1, 9999999961, 951, 961, 9999931, 999999999999921, 1, 1, 99999999801, 1, 99999999999999601, 99501, 99601, 99999999301, 99999999999999999999201, 1, 1, 9999999999998001, 1, 999999999999999999996001, 9995001, 9996001
Offset: 2

Views

Author

Bernard Schott, Mar 28 2022

Keywords

Comments

A331786(n) is the number of consecutive integers in the largest such possible run.
Numbers k for which a(k) = 1 are in A352317.

Examples

			a(4) = 997 because the A331786(4) = 6 consecutive numbers 997, 998, 999, 1000, 1001, 1002 have respectively sum of digits = 25, 26, 27, 1, 2, 3 and none is divisible by 4, and there is no smaller m < 997 such that sum of digits of m, m+1, m+2, m+3, m+4, m+5 is not divisible by 4.
		

Crossrefs

Programs

  • PARI
    a(n) = my(t=gcd(n%9, 9)); if(t<9, 10^lift(Mod(-1, n/t)/(9/t)) - 10^(n\9)*(n%9-t+1) + 1, 1); \\ Jinyuan Wang, Mar 28 2022

Formula

a(n) = A352689(n) - A331786(n) + 1 for n >= 2.
a(n) = 1 if n = 9*s, s > 0 (A008591), but the converse is not true.

Extensions

More terms from Jinyuan Wang, Mar 28 2022

A352689 a(n) is the last term of the first run of A331786(n) consecutive numbers whose sum of digits (A007953) is not divisible by n.

Original entry on oeis.org

10, 2, 1002, 13, 14, 1005, 10000006, 8, 18, 1000018, 38, 10000000038, 1048, 1058, 10000068, 1000000000000078, 98, 198, 100000000198, 398, 100000000000000398, 100498, 100598, 100000000698, 100000000000000000000798, 998, 1998, 10000000000001998, 3998, 1000000000000000000003998
Offset: 2

Views

Author

Bernard Schott, Mar 28 2022

Keywords

Comments

A331786(n) is the number of consecutive integers in the largest such possible run.

Examples

			a(4) = 1002 because the A331786(4) = 6 consecutive numbers 997, 998, 999, 1000, 1001, 1002 have respectively sum of digits = 25, 26, 27, 1, 2, 3 and none is divisible by 4, and there is no smaller m < 1002 such that sum of digits of m-5, m-4, m-3, m2, m-1, m is not divisible by 4.
		

Crossrefs

Formula

a(n) = A352688(n) + A331786(n) - 1.

Extensions

More terms from Jinyuan Wang, Mar 28 2022

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.

Original entry on oeis.org

1, 3, 3, 7, 9, 9, 13, 15, 9, 19, 39, 39, 79, 99, 99, 139, 159, 99, 199, 399, 399, 799, 999, 999, 1399, 1599, 999, 1999, 3999, 3999, 7999, 9999, 9999, 13999, 15999, 9999, 19999, 39999, 39999, 79999, 99999, 99999, 139999, 159999, 99999, 199999, 399999, 399999, 799999
Offset: 1

Views

Author

Jianing Song, Jan 25 2020

Keywords

Comments

The main sequence is A331786; this is added because some people may search for this.

Examples

			See A331786.
		

Crossrefs

Cf. A007953 (S(N)), A051885, A331786.
Row 10 of A331789.

Programs

  • PARI
    a(n) = my(s=(n-1)\9, t=(n-1)%9+1); 10^s*(2*t-gcd(t,9)+1)-1

Formula

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.
a(n) = A331786(n) + 1.
Conjectures from Colin Barker, Jan 26 2020: (Start)
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)).
a(n) = a(n-1) + 10*a(n-9) - 10*a(n-10) for n>10.
(End) [This conjecture is correct.]
a(n) = O(10^(n/9)).

A331787 T(b,n) is the largest m such that there exists N such that none of S(N), S(N+1), ..., S(N+m-1) is divisible by n, where S(N) is the sum of digits of N in base b. Square array read by ascending antidiagonals.

Original entry on oeis.org

0, 0, 2, 0, 1, 6, 0, 2, 4, 14, 0, 1, 2, 7, 30, 0, 2, 4, 6, 16, 62, 0, 1, 4, 3, 14, 25, 126, 0, 2, 2, 6, 8, 14, 52, 254, 0, 1, 4, 5, 4, 13, 30, 79, 510, 0, 2, 4, 6, 8, 10, 28, 62, 160, 1022, 0, 1, 2, 3, 8, 5, 22, 23, 62, 241, 2046, 0, 2, 4, 6, 8, 10, 12, 34, 48, 126, 484, 4094
Offset: 2

Views

Author

Jianing Song, Jan 25 2020

Keywords

Comments

Write n = (b-1)*s + t, 1 <= t <= b-1. The smallest N_0 such that none of S(N_0), S(N_0+1), ..., S(N_0+m-1) is divisible by n is given by N_0 = b^(u_0) - b^s*(t-gcd(t,b-1)+1) + 1, where u_0 is the smallest nonnegative solution to (b-1)*u == -gcd(t,b-1) (mod n). See my link below for more detailed information.

Examples

			Table begins
  b\n  1  2  3   4   5   6    7    8    9    10
   2   0  2  6  14  30  62  126  254  510  1022
   3   0  1  4   7  16  25   52   79  160   241
   4   0  2  2   6  14  14   30   62   62   126
   5   0  1  4   3   8  13   28   23   48    73
   6   0  2  4   6   4  10   22   34   46    34
   7   0  1  2   5   8   5   12   19   26    47
   8   0  2  4   6   8  10    6   14   30    46
   9   0  1  4   3   8   9   12    7   16    25
  10   0  2  2   6   8   8   12   14    8    18
		

Crossrefs

Cf. A331789.
Cf. A000918 (row 2), A164123 (row 3), A331786 (row 10).

Programs

  • PARI
    T(b,n) = my(s=(n-1)\(b-1), t=(n-1)%(b-1)+1); b^s*(2*t-gcd(t,b-1)+1)-2

Formula

If n = (b-1)*s + t, 1 <= t <= b-1, then T(b,n) = b^s*(2*t-gcd(t,b-1)+1) - 2. See my link for a proof of the formula.
T(b,n) = T(b,n-1) + b*T(b,n-b+1) - b*T(b,n-b) for b >= 2, n >= b+1.
T(b,n) = O(b^(n/(b-1))).

A352317 Numbers m such that A352688(m) = 1.

Original entry on oeis.org

3, 9, 10, 12, 18, 19, 21, 27, 28, 30, 36, 37, 39, 45, 46, 48, 54, 55, 57, 63, 64, 66, 72, 73, 75, 81, 82, 84, 90, 91, 93, 99, 100, 102, 108, 109, 111, 117, 118, 120, 126, 127, 129, 135, 136, 138, 144, 145, 147, 153, 154, 156, 162, 163, 165, 171, 172, 174, 180, 181, 183, 189, 190, 192, 198, 199
Offset: 1

Views

Author

Bernard Schott, Apr 14 2022

Keywords

Comments

Equivalently: numbers m such that the sum of digits (A007953) of the integers from 1 to A331786(m) is not divisible by m.
Numbers m such that the first run of A331786(m) consecutive numbers whose sum of digits (A007953) is not divisible by m begins at 1.
A331786(m) is the largest possible number of consecutive integers whose sum of digits is not divisible by m.
For this sequence here, A352689(m) = A331786(m).

Examples

			For m = 10, the sum of digits of the integers from 1 up to A331786(10) = 18 is not divisible by 10; then for 19, sod(19) = 10 is divisible by 10, hence 10 is a term.
		

Crossrefs

A008591 \ {0} and A017173 \ {1} are subsequences.

Programs

  • PARI
    a88(n) = my(t=gcd(n%9, 9)); if(t<9, 10^lift(Mod(-1, n/t)/(9/t)) - 10^(n\9)*(n%9-t+1) + 1, 1); \\ A352688
    isok(m) = a88(m) == 1; \\ Michel Marcus, Apr 15 2022

Extensions

More terms from Michel Marcus, Apr 15 2022
Showing 1-5 of 5 results.