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

A038102 Numbers k such that k is a substring of its base-2 representation.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1100, 1101, 10000, 10001, 10011, 10100, 10101, 10111, 11000, 11001, 11100, 11101, 100000, 100001, 101000, 101010, 101100, 101101, 101111, 110000, 110001, 110101, 111100, 111101, 1000000
Offset: 1

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			101000_10 = 1100010{101000}1000_2.
		

Crossrefs

Programs

  • Mathematica
    Select[FromDigits /@ IntegerDigits[Range[2^15]-1, 2], StringPosition[StringJoin @@ (ToString /@ IntegerDigits[#, 2]), ToString@#] != {} &] (* terms < 10^15, Giovanni Resta, Apr 30 2013 *)
    f[n_] := Block[{a = FromDigits@ IntegerDigits[n, 2]}, If[ StringPosition[ ToString@ FromDigits@ IntegerDigits[ a, 2], ToString@ a] != {}, a, 0]]; k = 0; lst = {}; While[k < 65, AppendTo[lst, f@k]; lst = Union@ lst; k++]; lst (* Robert G. Wilson v, Jun 29 2014 *)
  • PARI
    {for(vv=0, 200, bvv=binary(vv);
    mm=length(bvv); texp=0; btod=0;
    forstep(i=mm, 1, -1, btod=btod+bvv[i]*10^texp; texp++);
    bigb=binary(btod); lbb=length(bigb); swsq=1;
    for(k=0, lbb - mm , for(j=1, mm, if(bvv[j]!=bigb[j+k], swsq=0));
    if(swsq==1, print1(btod, ", "); break, swsq=1)))}
    \\\ Douglas Latimer, Apr 29 2013
    
  • Python
    from itertools import count, islice, product
    def ok(n): return int(max(str(n))) < 2 and str(n) in bin(n)
    def agen(): # generator of terms
        yield 0
        for d in count(1):
            for rest in product("01", repeat=d-1):
                k = int("1" + "".join(rest))
                if ok(k):
                    yield k
    print(list(islice(agen(), 35))) # Michael S. Branicky, Jan 04 2022

A228050 The decimal representation of n is a substring of its base 7 representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 5624032642, 5624033055, 5624104634, 5624105050, 5624110136, 102616333034, 102620103253, 103055445560, 206154633166, 206154633200, 212216263215, 212220033434, 315315450515, 321340554340, 424436332033, 424440102253, 430461435550
Offset: 1

Views

Author

Giovanni Resta, Aug 06 2013

Keywords

Examples

			2523016430113651303122433 = (53252301643011365130312243352)_7.
		

Crossrefs

A228052 The decimal representation of n is a substring of its base 9 representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 42212277303475883580, 42212277303475883581, 42212277303475883582, 42212277303475883583, 42212277303475883584, 42212277303475883585, 42212277303475883586, 42212277303475883587, 42212277303475883588, 1066338786883726756382
Offset: 1

Views

Author

Giovanni Resta, Aug 06 2013

Keywords

Examples

			42212277303475883588 = (342212277303475883588)_9.
		

Crossrefs

A038103 Numbers k such that k is a substring of its base-3 representation.

Original entry on oeis.org

0, 1, 2, 10, 20, 21, 102, 110, 210, 211, 212, 220, 1011, 1112, 1121, 2022, 12101, 12102, 12112, 12122, 10121021, 10121022, 12222212, 102121110, 102121120, 200121022, 1001120220, 2011001102, 2012012221, 2100221021, 2102111111
Offset: 1

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			12101 = base 10 -> 121{12101}2 = base 3.
		

Crossrefs

Programs

  • Python
    from sympy.ntheory.digits import digits
    from itertools import count, islice, product
    def agen(): # generator of terms
        yield 0
        for d in count(1):
            for first in "12":
                for rest in product("012", repeat=d-1):
                    s = first + "".join(rest)
                    if s in "".join(str(d) for d in digits(int(s), 3)[1:]):
                        yield int(s)
    print(list(islice(agen(), 31))) # Michael S. Branicky, Jan 08 2022
    
  • Python
    from itertools import count, islice
    from gmpy2 import digits
    def A038103_gen(): return (int(s) for s in (digits(n,3) for n in count(0)) if s in digits(int(s),3))
    A038103_list = list(islice(A038103_gen(),30)) # Chai Wah Wu, Jan 09 2022

A228051 The decimal representation of n is a substring of its base 8 representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 21355040, 21355041, 21355042, 21355043, 21355044, 21355045, 21355046, 21355047, 5406016340533523126, 5406016341275264235, 5406016341324744317, 5406016341324744320, 5406016341325061711, 5406016341325061712, 5406016342066514511
Offset: 1

Views

Author

Giovanni Resta, Aug 06 2013

Keywords

Examples

			5406016340533523126 = (454060163405335231266)_8.
		

Crossrefs

A038105 Numbers n with property that n is a substring of its base 5 representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 10000, 10001, 10002, 10003, 10004, 20000, 20001, 20002, 20003, 20004, 30000, 30001, 30002, 30003, 30004, 40000, 40001, 40002, 40003, 40004, 124343, 124401, 130000, 130001, 130002, 130003, 130004, 132114, 210000, 210001, 210002
Offset: 1

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			124343 = base 10 -> {124343}33 = base 5.
		

Crossrefs

A307257 Numbers k such that k is the substring identical to the most significant digits of its base-6 representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 155133423353, 1535554025003332541, 1541322512150022100, 14544222532144144105400055, 15313352033401001032012412, 144510301032554451200342301123415, 145033105231511102401034455341005, 152142233320210504134120425450055, 1435322205115414041210434301130104431115
Offset: 1

Views

Author

Scott R. Shannon, Apr 01 2019

Keywords

Comments

Numbers k whose base-6 representation begins with the same digits as k itself.

Examples

			155133423353_10 = 155133423353145_6, which also begins with '155133423353'.
		

Crossrefs

This is a subsequence of A038106.

Programs

  • PARI
    isok(n) = my(vb=digits(n, 6), vd=digits(n)); vd == vector(#vd, k, vb[k]); \\ Michel Marcus, Apr 08 2019

A038104 Numbers n with property that n is a substring of its base 4 representation.

Original entry on oeis.org

0, 1, 2, 3, 3320, 3321, 3322, 3323, 112000, 112001, 112002, 112003, 121322, 121330, 211320, 211321, 211322, 211323, 320232, 320302, 321230, 321301, 322222, 323221, 323320, 323321, 323322, 323323, 10030333, 20332101, 30132120, 30132121
Offset: 1

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			323323 = base 10 -> 1032{323323} = base 4.
		

Crossrefs

Showing 1-8 of 8 results.