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

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

A095221 (Concatenation 1,2,3,...,n) mod n.

Original entry on oeis.org

0, 0, 0, 2, 0, 0, 5, 6, 0, 0, 4, 0, 4, 4, 0, 12, 15, 0, 16, 0, 3, 4, 6, 12, 0, 16, 0, 8, 3, 0, 18, 28, 15, 16, 25, 0, 14, 10, 33, 20, 27, 24, 27, 4, 0, 36, 35, 12, 29, 0, 48, 4, 14, 0, 15, 4, 18, 28, 3, 0, 28, 60, 45, 60, 55, 48, 13, 52, 0, 50, 14, 36, 12, 72, 0, 20, 4, 72, 74, 60, 54, 24, 65
Offset: 1

Views

Author

Amarnath Murthy, Jun 10 2004

Keywords

Examples

			a(4) = 1234 mod 4 = 2.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen():
        s = "0"
        for n in count(1): s += str(n); yield int(s)%n
    print(list(islice(agen(), 83))) # Michael S. Branicky, Nov 21 2022

Formula

a(n) = A007908(n) mod n. - Michel Marcus, Nov 21 2022

Extensions

More terms from John W. Layman, Jul 29 2005

A358610 Numbers k such that the concatenation 1,2,3,... up to (k-1) is one less than a multiple of k.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 13, 20, 25, 40, 50, 52, 100, 125, 200, 250, 400, 475, 500, 601, 848, 908, 1000, 1120, 1250, 1750, 2000, 2500, 2800, 2900, 3670, 4000, 4375, 4685, 5000, 6085, 7000, 7640, 7924, 8375, 10000, 10900, 12500, 13346, 14000, 17800, 20000, 21568, 25000
Offset: 1

Views

Author

Martin Renner, Nov 23 2022

Keywords

Comments

For a >= 0, the infinite subsequence of numbers 10^a, 2^b*10^a (for 1 <= b <= 2) and 5^c*10^a (for 1 <= c <= 3), i.e., 1, 2, 4, 5, 10, 20, 25, 40, 50, 100, 125, 200, 250, 400, 500, 1000, 1250, 2000, 2500, 4000, 5000, ... are terms in the sequence because first, the concatenation 1, 2, 3, ... up to (10^a - 1) mod 10^a is equal to 10^a times the concatenation 1, 2, 3, ... up to (10^a - 2) + (10^a - 1) mod 10^a, which results in 10^a - 1 and second, the concatenation 1, 2, 3, ... up to (2^b*10^a - 1) mod 2^b*10^a is equal to 10^(a+1) times the concatenation 1, 2, 3, ... up to (2^b*10^a - 2) + (2^b*10^a - 1) mod 2^b*10^a, which results in 2^b*10^a - 1 and third, the concatenation 1, 2, 3, ... up to (5^c*10^a - 1) mod 5^c*10^a is equal to 10^(a+c) times the concatenation 1, 2, 3, ... up to (5^c*10^a - 2) + (5^c*10^a - 1) mod 5^c*10^a, which results in 5^c*10^a - 1.

Examples

			13 is a term because 123456789101112 mod 13 = 12.
20 is a term because 12345678910111213141516171819 mod 20 = 19.
		

Crossrefs

Programs

  • Maple
    a:=proc(m)
      local A, str, i;
      if m = 1 then return([1]);
      else
        if m = 2 then return([1, 2]);
        else
          A := [1, 2];
          str := 1;
          for i from 2 to m do
            str := str*10^length(i) + i;
            if str mod (i+1) = i then A := [op(A), i+1]; fi;
          od;
        fi;
      fi;
      return(A);
    end:
  • Python
    from itertools import count, islice
    def agen():
        s = "0"
        for n in count(1):
            if int(s)%n == n - 1: yield n
            s += str(n)
    print(list(islice(agen(), 30))) # Michael S. Branicky, Nov 23 2022
Showing 1-3 of 3 results.