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

A332585 Number of digits in the number formed by concatenating the digits of n, n+1, ..., A332584(n), or -1 if A332584(n) = -1.

Original entry on oeis.org

2, 154, 6443, 26258, 2, 86, 25, 4, 4165, 38, 505, 42, 108, 319, 2906, 90, 445, 636086, 711, 54, 245, 22, 12, 126, 32, 154843, 20, 30, 883, 2057, 4970, 577, 76, 70, 139, 749, 40, 89959, 380407, 42715, 805, 8548, 2031
Offset: 1

Views

Author

Keywords

Comments

a(44) is currently unknown.

Examples

			For n=2, A332584(2) = 88, and the concatenation 2 || 3 || ... || 82 is
  23456789101112131415161718192021222324252627282930313233343536373839\
  40414243444546474849505152535455565758596061626364656667686970717273747\
  576777879808182, which has 154 digits. So a(2) = 154.
		

Crossrefs

Formula

Let f(i) = A058183(i). Assuming A332584(n)>0, a(n) = f(A332584(n))-f(n-1) for n>1. - N. J. A. Sloane, Feb 20 2020

A332580 a(n) = minimal positive k such that the concatenation of the decimal digits of n,n+1,...,n+k is divisible by n+k+1, or -1 if no such k exists.

Original entry on oeis.org

1, 80, 1885, 6838, 1, 44, 13, 2, 1311, 18, 197, 20, 53, 134, 993, 44, 175, 124518, 263, 26, 107, 10, 5, 62, 15, 33172, 9, 14, 317, 708, 1501, 214, 37, 34, 67, 270, 19, 20188, 78277, 10738, 287, 2390, 695, 2783191412912, 3, 700, 8303, 350, 21, 100, 2249, 21326
Offset: 1

Views

Author

Keywords

Comments

Certainly n+k must be even, since no odd number can be divisible by an even number.
The values of n+k = n+a(n) are given in the companion sequence A332584.
A heuristic argument suggests that k should always exist.
As of Jul 10 2020, up to n = 1000 there are just two unknown values, a(158) and a(539).
The following remarks summarize program made during the first half of 2020.
On Feb 19 2020 Joseph Myers discovered that a(98) = 259110640. On Feb 20 2020 he reported that a(44) > 10^11 if it exists; a(92), a(158) and a(170) are all > 10^10 if they exist; a(494), a(539), a(563), a(761), a(854), a(944) and a(956) are all > 2*10^9 if they exist; and that he has found all the other values up to a(1000). - N. J. A. Sloane, Feb 23 2020.
Added Feb 26 2020: Joseph Myers has now checked all the numbers up to 1000 out to a limit of 10^11 (see link).
Update from Paul Zimmermann, Mar 17 2020: (Start)
I started a parallel program using the same algorithm as in Joseph Myers's "grow.c" program on the few sequences with unknown status in http://oeis.org/A332580/a332580_2.txt.
This program just found:
pzimmermann@wurst:~/A332580$ tail 956.out
n=956 kmax=200000000000
found k=162236437060
It thus seems that a(956) = 162236437060, i.e., the term of index n+k+1 is divisible by 162236438017 = 43 * 5051 * 746969. (End)
Partial confirmation from Scott R. Shannon, Mar 17 2020: I set n = 956 and a k value a few less than 162236437060 in my Java version of Joseph Myer's program, and it found the results Paul Zimmermann gave. But that’s not much of a confirmation as it uses the same algorithm, just implemented in a different language.
Partial confirmation from Pierrick Gaudry, Mar 18 2020: (Start)
I ran the attached small C program in order to check that a(956) = 162236437060. More precisely, I check only that the 162236437060-th integer obtained starting with 956 is indeed 0 modulo 162236438017.
For this there is no need to rely on multi-precision arithmetic. However, since 162236438017 > 2^32, it is not possible to use 64-bit arithmetic; or at least, it was easier to use the 128-bit arithmetic provided by the compiler.
The algorithm is then fairly simple: just compute iteratively the big number obtained by concatenating 956, 957, 958, ... and so on, and reduce all along the way modulo 162236438017. The result should be zero. This was tested on a few other known example.
After a bit more than 1 hour on my laptop, this indeed prints 0, thus confirming that a(956) <= 162236437060 (this simple method does not check if there is a smaller value). (End)
Full confirmation for a(956) from Joseph Myers, Mar 18 2020: I restarted computations for 956 where I had stopped them before (at 101 * 10^9) and ran them up to 163 * 10^9; I also get 162236437060.
Update from Paul Zimmermann, Mar 22 2020: (Start)
Here are four more values to check, confirmed independently by Pierrick Gaudry:
a(44) <= 2783191412912
a(92) <= 218128159460
a(494) <= 2314160375788
a(854) <= 440578095296 (also k=587470935254 divides)
All four values were found with the "sieving" algorithm I described in an earlier email (see the Alekseyev et al. paper), sieving all primes up to 5000000000. Thus it is possible that smaller solutions exist.
Up to n=1000, the remaining cases where we have no bound at present are 158, 539, 761, 944. (End)
a(761) <= 111508066823971. Now only 3 values remain up to n=1000 (158, 539, 944). Paul Zimmermann, Mar 23 2020
I restarted my exhaustive search for 92 where I had previously stopped it, and can confirm a(92) = 218128159460. - Joseph Myers, Mar 23 2020
The remaining values to check are:
a(44) <= 2783191412912, a(494) <= 2314160375788, a(761) <= 111508066823971, a(854) <= 440578095296. - Paul Zimmermann, Mar 24 2020
a(854) = 440578095296 confirmed by Joseph Myers on Mar 26 2020.
Summary: As of Apr 15 2020, a(n) is known for all n <= 1000 except for four values where we have only an upper bound (44, 494, 539, and 761), and two values (158, 944) where all we know is that if k exists then it is greater than 10^15. See the table in the Links section. - Joseph Myers and Paul Zimmermann.
From Paul Zimmermann, Apr 17 2020: I have completed the full check for n=494 up to n+k=10^12. Thus a(494) >= 10^12-494. It took about 4 hours. The final check from 10^12 to 2314160375788+494+1 should take another 4-5 hours. (I don't want this comment to be lost, even though it will probably be replaced by something stronger very soon. - N. J. A. Sloane, Apr 17 2020)
From Paul Zimmermann, Apr 18 2020: (Start)
I confirm that a(44) = 2783191412912 and a(494) = 2314160375788. These were checked with a parallel version of Joseph's program (attached). For n=44 I ran the following script which submits 28 jobs checking each a range of 10^11 values:
for i in `seq 0 27`; do
kmin=`expr 1 + $i \* 100000000000`
kmax=`expr $kmin + 100000000000 - 1`
oarsub -p "cluster='grvingt'" -q production -l walltime=5 "./A332580 -kmin $kmin 44 $kmax"
done
The last job took a little less than 4 hours (wall clock time) on a 32-core cpu (64 virtual cores), thus it took a total of about 300 cpu days. (End)
a(944) <= 1032422879252. - Paul Zimmermann, Apr 19 2020

Examples

			a(1) = 1 as '1' || '2' = '12', which is divisible by 3 (where || denotes decimal concatenation).
a(2) = 80: the concatenation 2 || 3 || ... || 82 is
  23456789101112131415161718192021222324252627282930313233343536373839\
  40414243444546474849505152535455565758596061626364656667686970717273747\
  576777879808182, which is divisible by 83.
a(7) = 13 as '7' || '8' || '9' || '10' || '11' || '12' ||  ... || '20' = 7891011121314151617181920, which is divisible by 21.
a(8) = 2 as '8' || '9' || '10' = 8910, which is divisible by 11.
		

Crossrefs

Cf. A061836 (multiplication instead of concatenation), A281232, A332584, A332585 (length of the final concatenation). See A058183 for finding the length of a concatenation.
For records see A333546, A333547.
For n=44, see A332562.
See A332563, A332586 for a base 2 version.
See A281232 for the positions of the 1's.
A029455 is an older sequence in the same spirit.

Programs

  • Maple
    grow := proc(n,M) # searches out to a limit of M, returns [n,n+k] or [n,-1] if no k was found
      local R,i;
      R:=n;
      for i from n+1 to M do
        R:=R*10^length(i)+i;
        if (i mod 2) = 0 then
          if (R mod (i+1)) = 0 then return([n, i]); fi;
        fi;
      od:
      [n, -1];
    end;
    for n from 1 to 100 do lprint(grow(n,20000)); od;
  • PARI
    apply( {a(n,L=10^logint(n*10,10),c=n)= n%2||c=c*L+n+1; for(k=n+++n%2,oo, kM. F. Hasler, Feb 20 2020

Extensions

Edited by Max Alekseyev, Dec 26 2024

A332558 a(n) is the smallest k such that n*(n+1)*(n+2)*...*(n+k) is divisible by n+k+1.

Original entry on oeis.org

4, 3, 2, 3, 4, 5, 4, 3, 5, 4, 6, 5, 6, 5, 4, 7, 6, 5, 4, 3, 6, 7, 6, 5, 4, 8, 7, 6, 6, 5, 8, 7, 6, 5, 4, 8, 7, 6, 5, 7, 6, 5, 10, 9, 8, 9, 8, 7, 6, 9, 8, 7, 6, 5, 4, 6, 12, 11, 10, 9, 8, 7, 6, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5
Offset: 1

Views

Author

Keywords

Comments

This is a multiplicative analog of A332542.
a(n) always exists because one can take k to be 2^m - 1 for m large.

Crossrefs

Cf. A061836 (k+1), A332559 (n+k+1), A332560 (the final product), A332561 (the quotient).
For records, see A333532 and A333533 (and A333537), which give the records in the essentially identical sequence A061836.
Additive version: A332542, A332543, A332544, A081123.
"Concatenate in base 10" version: A332580, A332584, A332585.

Programs

  • Maple
    f:= proc(n) local k,p;
      p:= n;
      for k from 1 do
        p:= p*(n+k);
        if (p/(n+k+1))::integer then return k fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 25 2020
  • Mathematica
    a[n_] := Module[{k, p = n}, For[k = 1, True, k++, p *= (n+k); If[Divisible[p, n+k+1], Return[k]]]];
    Array[a, 100] (* Jean-François Alcover, Jun 04 2020, after Maple *)
  • PARI
    a(n) = {my(r=n*(n+1)); for(k=2, oo, r=r*(n+k); if(r%(n+k+1)==0, return(k))); } \\ Jinyuan Wang, Feb 25 2020
    
  • PARI
    \\ See Corneth link
    
  • Python
    def a(n):
        k, p = 1, n*(n+1)
        while p%(n+k+1): k += 1; p *= (n+k)
        return k
    print([a(n) for n in range(1, 85)]) # Michael S. Branicky, Jun 06 2021

Formula

a(n) = A061836(n) - 1 for n >= 1.
a(n + 1) >= a(n) - 1. a(n + 1) = a(n) - 1 mostly. - David A. Corneth, Apr 14 2020

A061836 a(n) = smallest k>0 such that k+n divides k!.

Original entry on oeis.org

1, 5, 4, 3, 4, 5, 6, 5, 4, 6, 5, 7, 6, 7, 6, 5, 8, 7, 6, 5, 4, 7, 8, 7, 6, 5, 9, 8, 7, 7, 6, 9, 8, 7, 6, 5, 9, 8, 7, 6, 8, 7, 6, 11, 10, 9, 10, 9, 8, 7, 10, 9, 8, 7, 6, 5, 7, 13, 12, 11, 10, 9, 8, 7, 8, 7, 6, 13, 12, 11, 10, 9, 8, 7, 6, 9
Offset: 0

Views

Author

Robert G. Wilson v, Jun 22 2001

Keywords

Comments

Comments from M. F. Hasler, Feb 20 2020 (Start)
The index at which any n > 2 appears for the last time is given by A005096(n) = n! - n.
For m>2, a(n) > m for n > A005096(m).
The integer 1 appears only once as a(0), the integer 2 is the only positive integer which never appears. (End)
It would be nice to have an estimate for the growth of the upper envelope of this sequence - what is lim sup a(n)? The answer seems to be controlled by A333537. - N. J. A. Sloane, Apr 12 2020
Paul Zimmermann suggests that perhaps a(n) is O(log(n)^2). My estimate was n^(1/3), although that seems a bit low. - N. J. A. Sloane, Apr 09 2020

Crossrefs

Cf. A332584 for a "concatenation in base 10" variant.
See also A005096, A332558 (essentially identical to this one).
For records, see A333532 and A333533 (and A333537).

Programs

  • Mathematica
    f[n_] := (k = 1; While[ !IntegerQ[ k! / (k + n) ], k++ ]; k); Table[ f[n], {n, 0, 75} ]
  • PARI
    a(n) = my (f=1); for (k=1, oo, if ((f*=k)%(n+k)==0, return (k))) \\ Rémy Sigrist, Feb 17 2020

Extensions

"k>0" added to definition at the suggestion of Chai Wah Wu, Apr 09 2020. - N. J. A. Sloane, Apr 22 2020

A332563 a(n) = minimal positive k such that the concatenation of the binary expansions of n,n+1,...,n+k is divisible by n+k+1, or -1 if no such k exists.

Original entry on oeis.org

1, 6, 253, 160, 23, 6, 577, 14, 1, 4, 383, 8, 1591, 18, 169, 42, 1879, 210, 57, 20, 69, 1354, 13, 86, 225, 1532, 577, 300, 13, 30, 6419, 312, 30639, 12, 151, 8, 89, 2720, 29, 5830, 1, 1450, 195, 478, 55, 166528, 127, 1074, 3559, 252, 41
Offset: 1

Views

Author

Keywords

Comments

A base 2 analog of A332580.
For n up to 1000 the presently unknown values are a(213) and a(743).

Crossrefs

A332586 a(n) = minimal value of n+k+1 such that the concatenation of the binary expansions of n,n+1,...,n+k is divisible by n+k+1, or -1 if no such n+k+1 exists.

Original entry on oeis.org

3, 9, 257, 165, 29, 13, 585, 23, 11, 15, 395, 21, 1605, 33, 185, 59, 1897, 229, 77, 41, 91, 1377, 37, 111, 251, 1559, 605, 329, 43, 61, 6451, 345, 30673, 47, 187, 45, 127, 2759, 69, 5871, 43, 1493, 239, 523, 101, 166575, 175, 1123, 3609, 303, 93, 1139465, 4495201
Offset: 1

Views

Author

Keywords

Comments

For n up to 128 the presently unknown values are a(52) and a(53). If these values of k exist, they are at least 1000000.

Crossrefs

Programs

  • Mathematica
    Table[k=0;While[Mod[FromDigits[Flatten@IntegerDigits[Range[n,n+ ++k],2],2],n+k+1]!=0];n+k+1,{n,20}] (* Giorgos Kalogeropoulos, Apr 27 2021 *)

Extensions

a(52) from Michael S. Branicky, Apr 25 2021
a(53) from Michael S. Branicky, Apr 28 2021
Showing 1-6 of 6 results.