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

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

A171785 Start with a(1) = 1; then a(n) = smallest number > a(n-1) such that a(n) divides concat(a(1), a(2), ..., a(n)).

Original entry on oeis.org

1, 2, 3, 5, 10, 12, 15, 20, 25, 30, 39, 44, 50, 100, 101, 125, 150, 188, 200, 220, 230, 250, 272, 304, 320, 370, 376, 400, 500, 525, 600, 615, 625, 1000, 1250, 1487, 1500, 1590, 1696, 1750, 2000, 2245, 2500, 3000, 3090, 3125, 3800, 4000, 5000, 5725, 6122, 7025
Offset: 1

Views

Author

David Scambler, Sep 30 2010

Keywords

Comments

Primes appearing so far are 2, 3, 5, 101, 1487.

Examples

			1: 1 divides 1
1,2: 2 divides 12
1,2,3: 3 divides 123
1,2,3,4: 4 does NOT divide 1234, so
1,2,3,5: 5 divides 1235
etc.
		

Crossrefs

See A029455 for numbers that divide the concatenation of all numbers <= n.

Programs

  • Mathematica
    f[s_List] := Block[{k = s[[ -1]] + 1, conc = FromDigits[Flatten@ IntegerDigits@s]}, While[ Mod[conc*10^Floor[ Log[10, k] + 1] + k, k] != 0, k++ ]; Append[s, k]]; Nest[f, {1}, 51] (* Robert G. Wilson v, Oct 14 2010 *)
    nxt[{a_,c_}]:=Module[{k=a+1},While[!Divisible[c*10^IntegerLength[k]+ k, k], k++];{k,c*10^IntegerLength[k]+k}]; Transpose[NestList[nxt,{1,1},60]][[1]] (* Harvey P. Dale, Mar 08 2015 *)

Extensions

More terms from Robert G. Wilson v, Oct 14 2010

A075001 Smallest k such that the concatenation of n consecutive numbers starting with k (from k to n+k-1) is a multiple of n; or 0 if no such number exists.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 5, 1, 1, 9, 1, 4, 7, 1, 5, 23, 1, 14, 1, 9, 9, 13, 5, 1, 21, 1, 13, 12, 1, 36, 21, 9, 3, 41, 1, 34, 33, 9, 21, 12, 9, 33, 9, 1, 13, 28, 5, 48, 1, 23, 21, 3, 1, 11, 13, 14, 41, 28, 1, 114, 115, 9, 41, 21, 9, 23, 69, 1, 61, 73, 5, 14, 43, 1, 145, 13, 9, 127, 41, 9, 95
Offset: 1

Views

Author

Amarnath Murthy, Aug 31 2002

Keywords

Comments

Conjecture: For every n there exists a k.
First occurrence of k where a(n)=k: 1, 103, 4, 13, 8, 105, 14, 87, 11, 699, 55, 29, 23, 19, 114, 261, 102, 97, 178, 219, 26, 121, 17, 151, 92, ..., . - Robert G. Wilson v
a(n)=1 iff n is in A029455. - Robert G. Wilson v
Increasing a(n)'s: 1, 3, 5, 9, 23, 36, 41, 48, 114, 115, 145, 166, 175, 221, 251, ..., at n = 1, 4, 8, 11, 17, 31, 35, 49, 61, 62, 76, 85, 122, 133, 170, 179, 217, 229, ..., . - Robert G. Wilson v

Examples

			a(11) = 9 as 910111213141516171819 the concatenation of 11 numbers from 9 to 19 is divisible by 11 (11*82737383012865106529).
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{c = 1, id = Range@n}, While[k = FromDigits@Flatten@IntegerDigits@id/n; ! IntegerQ@k, id++; c++ ]; c]; Array[f, 82] (* Robert G. Wilson v, Oct 20 2007 *)
  • PARI
    /* The following program assumes the conjecture is true. */ /* It has found nonzero a(n) for n up to 500. */ {for(n=1,500, k=0; until(s%n==0,k++; s=0; for(m=k,k+n-1, s=s*(10^length(Str(m)))+m)); print1(k,","))}
    
  • PARI
    a(n) = {my(ld = 1, hd = n, qd, m = Mod(1, n), pow10, qdn = #digits(n), t=log(10*n+.5)\log(10)); qd = n*t+t-10^t\9; pow10 = Mod(10, n)^(qd-1); for(i = 2, n, m = m * Mod(10, n)^#digits(i) + i; ); while(1, if(lift(m) == 0, return(ld)); m -= ld * pow10; hd++; m = m * Mod(10, n)^#digits(hd) + hd; ld++; pow10*=10^(#digits(hd) - #digits(ld)); ) } \\ David A. Corneth, Aug 23 2020

Extensions

More terms from Rick L. Shepherd, Sep 03 2002

A110740 Numbers k such that the concatenation 1,2,3,...,(k-1) is divisible by k.

Original entry on oeis.org

1, 3, 9, 27, 69, 1053, 1599, 2511, 8167, 21371, 73323, 225681, 313401, 362703, 371321, 1896939, 2735667, 3426273, 3795093, 5433153, 302278903, 1371292077, 19755637749, 23560349643, 33184178631
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2005

Keywords

Comments

Subsequence of A029455 composed of the terms coprime to 10. - Max Alekseyev, Jun 07 2023
a(26) > 10^11. - Jason Yuen, Oct 12 2024

Examples

			3 divides 12, 9 divides 12345678.
		

Crossrefs

Programs

  • Mathematica
    s = ""; Do[s = s <> ToString[n]; If[Mod[ToExpression[s], n + 1] == 0, Print[n + 1]], {n, 0, 5*10^6}] (* Ryan Propper, Aug 28 2005 *)
    Select[Range[55*10^5],Divisible[FromDigits[Flatten[IntegerDigits/@Range[ #-1]]],#]&] (* Harvey P. Dale, Mar 28 2020 *)
  • Python
    # See A029455 for concat_mod
    def isok(k): return concat_mod(10, k-1, k)==0 # Jason Yuen, Oct 06 2024

Extensions

More terms from Ryan Propper, Aug 28 2005
a(20) from Giovanni Resta, Apr 10 2018
a(21)-a(24) from Scott R. Shannon, using a modified version of an algorithm by Joseph Myers, Apr 10 2020
a(25) from Jason Yuen, Oct 06 2024

A263623 a(1)=1; thereafter, a(n) = smallest k such that the decimal concatenation [a(n-2)+1 a(n-2)+2, ... a(n-1)] divides the decimal concatenation [a(n-1)+1 a(n-1)+2 ... k].

Original entry on oeis.org

1, 2, 4, 8, 36
Offset: 1

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Comments

a(6), if it exists, is > 10^6. - Lars Blomberg, Dec 01 2016
a(6) <= 86794654347484748866500883685475458354620023089553379437308257589024531796179370608623026912768. - Max Alekseyev, Dec 25 2024

Examples

			n=3: a(3) = 4 because k=4 is the smallest number such that 2 divides the concatenation 345...k.
n=4: a(4) = 8 because k=8 is the smallest number such that 34 divides the concatenation 567...k. See A002782 for the relevant concatenations.
		

Crossrefs

A362966 Numbers k such that A007908(k) == 1 (mod k).

Original entry on oeis.org

1, 121487, 293957, 13449179, 549999887
Offset: 1

Views

Author

Max Alekseyev, Jun 06 2023

Keywords

Comments

a(6) > 10^11. - Jason Yuen, Oct 12 2024

Crossrefs

Programs

  • Python
    # See A029455 for concat_mod
    def isok(k): return concat_mod(10, k, k)==1%k # Jason Yuen, Oct 12 2024

A068090 Numbers n which divide the right concatenation of the first n even numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 18, 20, 24, 25, 30, 35, 36, 39, 40, 45, 50, 60, 72, 75, 80, 90, 100, 120, 125, 144, 150, 180, 200, 204, 225, 240, 250, 300, 360, 375, 400, 450, 500, 507, 540, 585, 600, 624, 625, 675, 702, 720, 750, 780, 800, 804, 864, 900
Offset: 1

Views

Author

Amarnath Murthy, Feb 19 2002

Keywords

Examples

			The right concatenation of the first six even numbers is 24681012 and 6 divides this number. So 6 is a member of the sequence.
		

Crossrefs

Cf. A029455.

Programs

  • Maple
    a := proc(n): if n=1 then RETURN(2) fi: 2*n+a(n-1)*10^(ceil(log[10](2*n+.01))) end: for n from 1 to 1000 do if a(n) mod n = 0 then printf(`%d,`,n) fi; od:
  • Mathematica
    concat[n_]:=FromDigits[Flatten[IntegerDigits/@Range[2,2n,2]]]; Select[ Range[700],Divisible[concat[#],#]&] (* Harvey P. Dale, Nov 02 2011 *)

Extensions

Edited and extended by James Sellers, Feb 20 2002
Offset corrected by Sean A. Irvine, Jan 25 2024

A072712 Primes p such that p divides the (right) concatenation of all numbers from 1 to p written in base 10 (most significant digit on left).

Original entry on oeis.org

2, 3, 5, 8167, 371321
Offset: 1

Views

Author

Jeff Heleen, Aug 07 2002

Keywords

Comments

Right concatenation, normal order.
Primes in A029455. - Derek Orr, Oct 04 2014

Examples

			p=17 is not a term since 1234567891011121314151617 is not divisible by 17.
		

Crossrefs

Programs

  • PARI
    p=""; n=1; while(n<10^4, p=concat(p,Str(n)); if(eval(p)%n==0&&isprime(n), print1(n,", ")); n++) \\ Derek Orr, Oct 04 2014

Extensions

Another term from Jeff Heleen, Oct 11 2009

A302687 a(1) = 1; a(2) = 2; then a(n) is the smallest number > a(n-1) such that a(n) divides concat(a(1), a(2), ..., a(n-1)).

Original entry on oeis.org

1, 2, 3, 41, 43, 129, 9567001, 21147541, 22662659, 23817877, 24837187, 28850377, 28872229, 37916473, 48749751, 70416307, 439229167, 834385607, 2270365163, 2278377431, 3751789547, 4433933101, 4810754611, 14432263833, 15632412757, 30530543651, 42441819717, 65591903199, 65857498407
Offset: 1

Views

Author

Daniel Sterman, Apr 11 2018

Keywords

Examples

			a(3) = 3, which makes the concatenation of the first three terms: 123. After 3, the next-highest factor of 123 is 41, so a(4) = 41. The concatenation of the first four terms is then 12341. After 41, the next-highest factor of 12341 is 43, so a(5) = 43.
		

Crossrefs

Compare A240588, in which each term does not need to strictly increase as long as it has not yet appeared in the sequence.
Compare also A171785, in which each term must divide the concatenation of all terms in the sequence including itself.
In A029455, each term divides the concatenation of all smaller positive integers.
In A110740, each term divides the concatenation of all strictly smaller positive integers.

Programs

  • Maple
    A[1]:= 1: A[2]:= 2: C:= 1:
    for n from 3 to 20 do
      C:= A[n-1]+C*10^(ilog10(A[n-1])+1);
      A[n]:= min(select(`>`,numtheory:-divisors(C),A[n-1]))
    od:
    seq(A[i],i=1..20); # Robert Israel, Apr 12 2018

Extensions

a(16)-a(20) from Robert Israel, Apr 12 2018
a(21)-a(29) from Daniel Suteu, Apr 12 2018
Showing 1-9 of 9 results.