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-10 of 12 results. Next

A350572 Base-10 version of A038102 interpreted as base 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 19, 20, 21, 23, 24, 25, 28, 29, 32, 33, 40, 42, 44, 45, 47, 48, 49, 53, 60, 61, 64, 65, 66, 80, 81, 82, 90, 91, 96, 97, 100, 112, 113, 121, 128, 129, 137, 144, 145, 152, 161, 192, 193, 203
Offset: 1

Views

Author

Robert G. Wilson v, Jun 30 2014; entered by Hans Havermann, Jan 06 2022

Keywords

Crossrefs

Programs

  • Mathematica
    B2[n_] := FromDigits[IntegerDigits[n, 2]]
    SP[n_] := (b = B2[n]; StringPosition[ToString[B2[b]], ToString[b]])
    n=0; t={}; While[n<10^6, If[SP[n]!={}, AppendTo[t,n]]; n++]; t
    (* Hans Havermann, Jan 06 2022 *)
  • Python
    def ok(n): b = bin(n)[2:]; return b in bin(int(b))
    print([k for k in range(204) if ok(k)]) # Michael S. Branicky, Jan 06 2022

A181929 Numbers n such that n is the substring identical to the most significant bits of its base 2 representation.

Original entry on oeis.org

0, 1, 10, 110, 10011, 110101, 10011000, 110100011, 10010101001, 101111000101, 110011001110, 10010001101010, 101101111110011, 110010000001101, 1111110010100011, 10001110000111111, 101100111001011100, 110000110110011001, 1111011010110001101
Offset: 1

Views

Author

Douglas Latimer, Apr 02 2012

Keywords

Comments

The main idea behind my program is that if we say start searching from 10000, which is 10011... binary, then as the binary string for the first 5 places is larger than our decimal value, then the decimal value can be immediately jumped to 10011 for the next search number. Repeating this process (while also doing slight jumps if the decimal value is larger than the binary), allows ones to do very large jumps in the checked decimal values, sometimes eliminating an entire string of length n in just a few checks. I got the idea from similar people were using when searching for the next term in A258107. - Scott R. Shannon, Feb 25 2021

Examples

			The number 110 is represented in the binary system by the string "1101110". 110 is a three-digit number, so we consider the 3 most significant bits, which are "110", identical to the string of digits used to represent the number 110. Thus 110 is in the sequence.
		

Crossrefs

This is a subsequence of A038102. Sequence A181891 has a similar definition.
Subsequence of A007088.

Programs

  • Mathematica
    fQ[n_] := Module[{d = IntegerDigits[n], len}, len = Length[d]; d == Take[IntegerDigits[n, 2], len]]; Select[Range[0, 1000000], fQ] (* T. D. Noe, Apr 03 2012 *)
  • PARI
    {for(vv=0,2000000,bvv=binary(vv);
    ll=length(bvv);texp=0;btod=0;
    forstep(i=ll,1,-1,btod=btod+bvv[i]*10^texp;texp++);
    bigb=binary(btod);swsq=1;
    for(j=1,ll,if(bvv[j]!=bigb[j],swsq=0));
    if(swsq==1,print(btod)))}
    
  • PARI
    lista(nn) = {for (n=0, nn, if (n==0, print1(n, ", "), my(b = binary(n), db = fromdigits(b), bb = binary(db)); if (vector(#b, k, bb[k]) == b, print1(db, ", "));););} \\ Michel Marcus, Feb 10 2021

A038106 Numbers k with the property that k is a substring of its base-6 representation.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 45240, 45241, 45242, 45243, 45244, 45245, 54000, 54001, 54002, 54003, 54004, 54005, 304200, 304201, 304202, 304203, 304204, 304205, 3240000, 3240001, 3240002, 3240003, 3240004, 3240005, 3544200, 3544201, 3544202
Offset: 1

Views

Author

Patrick De Geest, Feb 15 1999

Keywords

Examples

			304201_10 = 10{304201}_6.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,355*10^4],SequenceCount[IntegerDigits[#,6],IntegerDigits[#]]>0&] (* Harvey P. Dale, Mar 11 2023 *)

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

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

A181891 Numbers n such that n is the substring identical to the least significant bits of its base 2 representation.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1100, 1101, 10000, 10001, 10100, 10101, 11000, 11001, 11100, 11101, 100000, 100001, 101100, 101101, 110000, 110001, 111100, 111101, 1000000, 1000001, 1010000, 1010001, 1100000, 1100001, 1110000, 1110001
Offset: 1

Views

Author

Douglas Latimer, Mar 30 2012

Keywords

Comments

Terms with odd index, that is, a(1), a(3), a(5), ... are all multiples of 10. Each even-index term is one more than its predecessor, so that a(2n) = a(2n-1) + 1. [Douglas Latimer, Apr 26 2013]

Examples

			The number 11 is represented in the binary system by the string "1011". 11 is a two-digit number, so we consider the 2 least significant bits, which are "11", identical to the string of digits used to represent the number 11. Thus 11 is in the sequence.
		

Crossrefs

This is a subsequence of A038102. Sequence A181929 has similar definition.

Programs

  • Mathematica
    fQ[n_] := Module[{d = IntegerDigits[n], len}, len = Length[d]; d == Take[IntegerDigits[n, 2], -len]]; Select[Range[0, 1000000], fQ] (* T. D. Noe, Apr 03 2012 *)
  • PARI
    {for(vv=0,200,bvv=binary(vv);
    ll=length(bvv);texp=0;btod=0;
    forstep(i=ll,1,-1,btod=btod+bvv[i]*10^texp;texp++);
    bigb=binary(btod);lbb=length(bigb);swsq=1;
    forstep(j=ll,1,-1,if(bvv[j]!=bigb[lbb],swsq=0);lbb--);
    if(swsq==1,print(btod)))}
Showing 1-10 of 12 results. Next