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

A332703 Lexicographically earliest sequence of distinct positive terms such that a(n) is a substring of a(n)*a(n+1).

Original entry on oeis.org

1, 10, 11, 100, 21, 58, 51, 69, 39, 87, 33, 101, 1000, 31, 102, 501, 699, 1001, 10000, 41, 59, 27, 103, 1002, 5001, 6999, 8144, 626, 739, 506, 693, 533, 404, 251, 767, 752, 126, 894, 793, 981, 202, 1003, 10001, 100000, 61, 92, 26, 151, 1004, 2501, 7697, 5037, 6453, 20001, 59998, 50001, 69999
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Feb 20 2020

Keywords

Examples

			1, 10, 11, 100, 21, 58, 51, 69,
a(1)*a(2) = 1*10 = 100 with 1 substring of 100;
a(2)*a(3) = 10*11 = 110 with 10 substring of 110;
a(3)*a(4) = 11*100 = 1100 with 11 substring of 1100;
a(4)*a(5) = 100*21 = 2100 with 100 substring of 2100;
a(5)*a(6) = 21*58 = 1218 with 21 substring of 1218;
a(6)*a(7) = 58*51 = 2958 with 58 substring of 2958;
a(7)*a(8) = 51*69 = 3519 with 51 substring of 3519; etc.
		

Crossrefs

Cf. A086064.

A333410 a(n) is the smallest positive integer not yet appearing in the sequence such that n*a(n) contains n as a substring.

Original entry on oeis.org

1, 6, 10, 11, 3, 16, 21, 23, 22, 31, 100, 26, 87, 51, 41, 73, 69, 66, 63, 36, 58, 101, 97, 52, 5, 102, 103, 46, 79, 61, 107, 76, 192, 151, 81, 38, 201, 89, 164, 35, 59, 34, 173, 126, 99, 184, 74, 135, 153, 7, 167, 176, 29, 251, 121, 28, 168, 148, 27, 56, 92, 123, 137, 57, 141, 207, 25, 113
Offset: 1

Views

Author

Scott R. Shannon, Apr 11 2020

Keywords

Examples

			a(2) = 6 as 6 has not appeared previously and 2 * 6 = 12 which contains '2' as a substring.
a(6) = 16 as 16 has not appeared previously and 6 * 16 = 96 which contains '6' as a substring.
a(7) = 21 as 21 has not appeared previously and 7 * 21 = 147 which contains '7' as a substring.
		

Crossrefs

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        s, mink, aset, concat = 1, 2, {1}, "1"
        yield from [1]
        for n in count(2):
            an, sn = mink, str(n)
            while an in aset or not sn in str(n*an): an += 1
            aset.add(an); s += an; concat += str(an); yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 68))) # Michael S. Branicky, Feb 08 2024

A087217 In decimal representation: smallest multiple of n containing it as substring.

Original entry on oeis.org

10, 12, 30, 24, 15, 36, 70, 48, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 120, 210, 220, 230, 240, 125, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 240, 410, 420, 430, 440, 450, 460, 470, 480, 490, 150, 510, 520, 530
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 26 2003

Keywords

Comments

a(n) = n*A086064(n).

Programs

  • Mathematica
    smn[n_]:=Module[{k=2},While[SequenceCount[IntegerDigits[k*n],IntegerDigits[ n]]<1,k++];k*n]; Array[smn,60] (* Harvey P. Dale, Oct 02 2021 *)
  • Python
    def a(n):
        s = str(n)
        return next(mn for mn in range(2*n, 11*n, n) if s in str(mn))
    print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Feb 23 2025

A371895 a(n) is the least k>0 such that n*k contains the n-th prime as a substring.

Original entry on oeis.org

2, 15, 5, 18, 22, 22, 25, 24, 26, 29, 21, 31, 32, 31, 98, 96, 27, 34, 88, 355, 13, 36, 21, 79, 39, 39, 189, 383, 376, 371, 41, 41, 416, 41, 426, 42, 425, 43, 43, 433, 419, 431, 237, 44, 266, 433, 45, 465, 464, 458, 83, 46, 423, 417, 468, 47, 472, 468, 47, 469, 103, 473, 488, 486, 202, 481, 348, 496, 63, 499
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Apr 11 2024

Keywords

Comments

From Robert Israel, Jun 06 2024: (Start)
If n is divisible by 2*10^k or 5*10^k, a(n) >= prime(n)*10^(k+1)/n.
Let n = 2^b * 5^c * k with k coprime to 10, and suppose prime(n) has d digits. If b <= c, then f(n) < 10^d * 2^(c-b). If b > c, then f(n) < 10^d * 5^(b-c).
a(10^k) = prime(10^k).
a(2*10^k) = 5 * prime(2*10^k).
a(5*10^k) = 2 * prime(5*10^k). (End)

Examples

			a(8) = 24 because 24 is the least positive integer such that 24*8 = 192 contains the prime(8) = 19.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t,k;
      t:= convert(ithprime(n),string);
      for k from 1 do
         if StringTools:-Search(t, convert(n*k,string)) > 0 then return k fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 05 2024
  • Mathematica
    a[n_]:=(k=1;While[!StringContainsQ[ToString[n*k],ToString@Prime@n],k++];k); Array[a,70]
  • PARI
    a(n) = my(k=1, s=Str(prime(n))); while(#strsplit(Str(k*n), s) < 2, k++); k; \\ Michel Marcus, Apr 11 2024
  • Python
    from sympy import prime
    from itertools import count
    def a(n): t=str(prime(n)); return next(k for k in count(1) if t in str(n*k))
    print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Apr 11 2024
    
  • Python
    # faster for initial segment of sequence
    from sympy import nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        pn = 2
        for n in count(1):
            t = str(pn)
            yield next(k for k in count(1) if t in str(n*k))
            pn = nextprime(pn)
    print(list(islice(agen(), 70))) # Michael S. Branicky, Apr 11 2024
    
Showing 1-4 of 4 results.