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.

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

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

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 13663722656306465044, 13664030703642511032, 13707143454447524553, 13710552565235121771, 14336552505653142213, 14340267205650777016, 14340267205651006010, 15013125376232575510, 15013125401147630620, 10142740706726414575022612720
Offset: 1

Views

Author

Scott R. Shannon, May 11 2019

Keywords

Comments

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

Examples

			13663722656306465044_10 = 1366372265630646504424_8, which also begins with '13663722656306465044'.
		

Crossrefs

This is a subsequence of A228051.
See A181929, A307254, A307255, A307256, A307257, A308070, A308072 for other bases.

Programs

  • PARI
    isok(n) = my(vb=digits(n, 8), vd=digits(n)); vd == vector(#vd, k, vb[k]); \\ Michel Marcus, May 17 2019
Showing 1-4 of 4 results.