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.

A029455 Numbers k that divide the (right) concatenation of all numbers <= k written in base 10 (most significant digit on left).

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 12, 15, 18, 20, 25, 27, 30, 36, 45, 50, 54, 60, 69, 75, 90, 100, 108, 120, 125, 135, 150, 162, 180, 200, 216, 225, 248, 250, 270, 300, 324, 360, 375, 405, 450, 470, 500, 540, 558, 600, 648, 675, 710, 750, 810, 900, 1000, 1053, 1080, 1116
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that k divides A007908(k).

Examples

			k = 13 is not a term since 12345678910111213 is not divisible by 13.
		

Crossrefs

Cf. A007908.
See A171785 for numbers that divide the concatenation of a(1) through a(n).

Programs

  • Mathematica
    b = 10; c = {}; Select[Range[10^5], Divisible[FromDigits[c = Join[c, IntegerDigits[#, b]], b], #] &] (* Robert Price, Mar 11 2020 *)
    Select[Range[1200],Divisible[FromDigits[Flatten[IntegerDigits/@Range[#]]],#]&] (* Harvey P. Dale, Dec 31 2020 *)
    nxt[{rc_,n_}]:={rc*10^IntegerLength[n+1]+n+1,n+1}; Select[NestList[nxt,{1,1},1200],Mod[#[[1]],#[[2]]]==0&][[;;,2]] (* Harvey P. Dale, Sep 26 2023 *)
  • PARI
    c=0;for(d=1,1e9,for(n=d,-1+d*=10,(c=c*d+n)%n || print1(n","));d--) \\ M. F. Hasler, Sep 11 2011
    
  • Python
    A029455_list, r = [], 0
    for n in range(1,10**4+1):
        r = r*10**len(str(n))+n
        if not (r % n):
            A029455_list.append(n) # Chai Wah Wu, Nov 05 2014
    
  • Python
    def concat_mod(base, k, mod):
      total, digits, n1 = 0, 1, 1
      while n1 <= k:
        n2, p = min(n1*base-1, k), n1*base
        # Compute ((p-1)*n1+1)*p**(n2-n1+1)-(n2+1)*p+n2 divided by (p-1)**2.
        # Since (a//b)%mod == (a%(b*mod))//b, compute the numerator mod (p-1)**2*mod.
        tmp = pow(p, n2-n1+1, (p-1)**2*mod)
        tmp = ((p-1)*n1+1)*tmp-(n2+1)*p+n2
        tmp = (tmp%((p-1)**2*mod))//(p-1)**2
        total = (total*pow(p, n2-n1+1, mod)+tmp)%mod
        digits, n1 = digits+1, p
      return total
    for k in range(1, 10**10+1):
      if concat_mod(10, k, k) == 0: print(k) # Jason Yuen, Jan 27 2024

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

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

Original entry on oeis.org

1, 2, 4, 5, 10, 20, 25, 50, 100, 125, 200, 250, 400, 500, 625, 1000, 1250, 2000, 2500, 3125, 5000, 6250, 10000, 12500, 15625, 20000, 25000, 31250, 40000, 50000, 62500, 78125, 100000, 125000, 156250, 200000, 250000, 312500, 390625, 500000, 625000, 781250, 1000000
Offset: 1

Views

Author

Paolo P. Lava, Dec 01 2014

Keywords

Examples

			a(1) = 1;
a(2) = 2 -> 12 /2 = 6;
Now we cannot use 3 as the next term because it does not divide 23.
a(3) = 4 -> 24 / 4 = 6;
a(4) = 5 -> 45 / 5 = 9;
Again, 6, 7, 8 and 9 cannot be used as the next term.
a(5) = 10 -> 510 / 10 = 51;
a(6) = 20 -> 1020 / 20 = 51;
a(7) = 25 -> 2025 / 25 = 81; etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,k,n; print(1); a:=1;
    for n from 2 to q do if type((a*10^(1+ilog10(n))+n)/n,integer)
    then a:=n; print(n); fi; od; end: P(10^12);

A249399 Start with a(1) = 1 then a(n) = smallest number, not already in the sequence, such that a(n) divides concat(a(n-1),a(n)).

Original entry on oeis.org

1, 2, 4, 5, 10, 20, 8, 16, 25, 50, 40, 32, 64, 80, 100, 125, 200, 160, 128, 250, 400, 320, 256, 500, 625, 1000, 800, 640, 512, 1024, 1250, 2000, 1280, 1600, 2500, 3125, 5000, 3200, 2048, 2560, 4000, 6250, 10000, 6400, 4096, 5120, 8000, 10240, 8192, 12500, 15625
Offset: 1

Views

Author

Paolo P. Lava, Dec 01 2014

Keywords

Comments

Like A249398, but without the constraint a(n) > a(n-1).

Examples

			a(1) = 1;
a(2) = 2 -> 12 /2 = 6;
Now we cannot use 3 as the next term because it does not divide 23.
a(3) = 4 -> 24 / 4 = 6;
a(4) = 5 -> 45 / 5 = 9;
Again, 3, 6, 7, 8 and 9 cannot be used as the next term.
a(5) = 10 -> 510 / 10 = 51;
a(6) = 20 -> 1020 / 20 = 51;
a(7) = 8 -> 208 / 8 = 26; etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,b,k,n; print(1); a:=1; b:={1};
    for k from 1 to q do for n from 1 to q do if nops({n} intersect b)<1
    then if type((a*10^(1+ilog10(n))+n)/n,integer)
    then a:=n; b:=b union {n}; print(n); break;
    fi; fi; od; od; end: P(10^12);

A250745 Start with a(1) = 1; then a(n) = smallest number, not already in the sequence, such that a(n) divides concat(a(1), a(2), ..., a(n)).

Original entry on oeis.org

1, 2, 3, 5, 10, 4, 8, 6, 11, 20, 13, 7, 9, 12, 15, 18, 14, 25, 30, 24, 16, 32, 40, 29, 50, 100, 26, 52, 39, 21, 28, 35, 42, 17, 34, 51, 23, 46, 27, 36, 45, 43, 19, 38, 68, 48, 60, 75, 90, 54, 56, 58, 22, 44, 33, 55, 97, 125, 200, 64, 80, 69, 66, 88, 70, 41, 82
Offset: 1

Views

Author

Paolo P. Lava, Nov 27 2014

Keywords

Comments

Like A171785 but without the constraint a(n) > a(n-1).
Among the first 1000 terms, a(n) = n for n = 1, 2, 3, 15, 170, 577, 759, and the numbers not yet found are 149, 298, 347, 401, 447, 454, 457, 467, 487, 509, etc.
Is this sequence a rearrangement of the natural numbers?

Examples

			a(1) = 1;
a(2) = 2 -> 12 /2 = 6;
a(3) = 3 -> 123 / 3 = 41;
Then we cannot use 4 as the next term because 1234 / 4 = 617 / 2.
a(4) = 5 -> 1235 / 5 = 247;
Again, 4, 6, 7, 8 and 9 cannot be used as the next term.
a(5) = 10 -> 123510 / 10 = 12351;
a(6) = 4 -> 1235104 / 4 = 308776;
a(7) = 8 -> 12351048 / 8 = 1543881; etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,b,k,n; a:=0; b:={};
    for k from 1 to q do for n from 1 to q do if nops({n} intersect b)<1
    then if type((a*10^(1+ilog10(n))+n)/n,integer)
    then a:=a*10^(1+ilog10(n))+n; b:= b union {n}; print(n); break;
    fi; fi; od; od; end: P(10^5);

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

Original entry on oeis.org

0, 1, 2, 3, 5, 10, 15, 18, 19, 35, 42, 51, 55, 70, 85, 93, 95, 106, 155, 217, 310, 745, 1210, 1342, 3355, 5185, 6222, 6330, 9495, 10413, 11115, 12070, 13774, 34435, 41322, 61983, 68870, 1601065116264571, 2217993924228622, 2324778503347862, 2325380783693255
Offset: 0

Views

Author

Paolo P. Lava, Nov 27 2014

Keywords

Comments

This sequence is infinite. - Robert G. Wilson v, Dec 09 2014

Examples

			a(0) = 0;
a(1) = 1 -> 10 / 1 = 10;
a(2) = 2 -> 210 / 2 = 105;
a(3) = 3 -> 3210 / 3 = 1070;
Now we cannot use 4 as the next term because 43210 / 4 = 21605 / 2.
a(4) = 5 -> 32105 / 5 = 6421; etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,k,n; print(0); print(1); a:=10;
    for n from 2 to q do if type((n*10^(1+ilog10(a))+a)/n,integer)
    then a:=n*10^(1+ilog10(a))+a; print(n);
    fi; od; end: P(10^9);
  • Mathematica
    f[lst_List] := Block[{k = lst[[-1]] + 1, id = FromDigits@ Flatten@ IntegerDigits@ Reverse@ lst}, While[ Mod[ id, k] > 0, k++]; Append[lst, k]]; Nest[f, {0}, 36] (* or *)
    f[lst_List] := Block[{mn = lst[[-1]], id = FromDigits@ Flatten@ IntegerDigits@ Reverse@ lst}, d = Divisors@ id; Append[lst, Min@ Select[d, # > mn &]]]; Nest[f, {0, 1}, 36] (* Robert G. Wilson v, Dec 08 2014 *)

Extensions

a(37)-a(40) from Robert G. Wilson v, Dec 08 2014

A250747 Start with a(0) = 0; then a(n) = smallest number not already in the sequence such that a(n) divides concat(a(n), a(n-1), ..., a(0)).

Original entry on oeis.org

0, 1, 2, 3, 5, 10, 6, 9, 13, 26, 15, 18, 30, 431, 73, 67, 134, 7, 14, 21, 35, 29, 58, 127, 27, 39, 43, 70, 11, 22, 19, 38, 95, 190, 2748070932534311, 2768821759897, 5537643519794, 787, 191, 382, 955, 17, 31, 45, 54, 90, 101, 202, 303, 57, 114, 47, 55, 33, 66
Offset: 0

Views

Author

Paolo P. Lava, Nov 28 2014

Keywords

Comments

Like A250746, but without the constraint a(n) > a(n-1).

Examples

			a(0) = 0;
a(1) = 1 -> 10 / 1 = 10;
a(2) = 2 -> 210 / 2 = 105;
a(3) = 3 -> 3210 / 3 = 1070;
Now we cannot use 4 as the next term because 43210 / 4 = 21605 / 2.
a(4) = 5 -> 32105 / 5 = 6421;
Again, we cannot use 4, 6, 7, 8 or 9.
a(5) = 10 -> 1053210 / 10 = 105321.
We still cannot use 4, but 6 is ok.
a(6) = 6 -> 61053210 / 6 = 10175535. Etc.
		

Crossrefs

Programs

  • Maple
    with(numtheory); P:=proc(q) local a,b,k,n; print(0); print(1); a:=10; b:={0,1};
    for k from 1 to q do for n from 1 to q do if nops({n} intersect b)<1
    then if type((n*10^(1+ilog10(a))+a)/n,integer)
    then a:=n*10^(1+ilog10(a))+a; b:= b union {n}; print(n); break; fi; fi;
    od; od; end: P(10^5);

Extensions

More terms from Jon E. Schoenfield, Nov 29 2014

A228806 Smallest odd number greater than any previous term such that it divides the concatenation of all the previous terms and itself; begin with 1.

Original entry on oeis.org

1, 5, 15, 25, 29, 35, 125, 625, 2125, 2675, 3125, 15625, 20125, 21875, 23975, 24797, 25125, 36875, 47495, 47725, 51875, 53125, 78125, 135475, 390625, 1171875, 1903875, 1928595, 2142375, 2265625, 6617125, 8385625, 8790525, 8807085, 8818575, 10504785
Offset: 1

Views

Author

Robert G. Wilson v, Sep 04 2013

Keywords

Comments

Terms not congruent to 0 (mod 5) are: 1, 29, 24797, 24848081, 91381387, 274144161, ..., .
Terms not congruent to 0 (mod 25) are: 1, 5, 15, 29, 35, 24797, 47495, 1928595, 8807085, 10504785, 24848081, 91381387, 274144161, ..., .

Examples

			a(5) equals 29 because 15152527 (mod 27) == 19, but 15152529 (mod 29) == 0.
		

Crossrefs

Cf. A171785.

Programs

  • Mathematica
    f[s_List] := Block[{k = s[[-1]] + 2, conc = FromDigits[ Flatten@ IntegerDigits@ s]}, While[ Mod[ conc*10^Floor[ Log[10, k] + 1] + k, k] != 0, k += 2]; Append[s, k]]; Nest[f, {1}, 25]

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.