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.

A175059 a(n) = decimal equivalent of {A144795(n) written in binary, and each run of 1's reduced in length by one digit}.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 5, 12, 14, 15, 16, 9, 10, 11, 24, 13, 28, 30, 31, 32, 17, 18, 19, 20, 22, 23, 48, 25, 26, 27, 56, 29, 60, 62, 63, 64, 33, 34, 35, 36, 38, 39, 40, 21, 44, 46, 47, 96, 49, 50, 51, 52, 54, 55, 112, 57, 58, 59, 120, 61, 124, 126, 127, 128, 65, 66, 67, 68, 70
Offset: 1

Views

Author

Leroy Quet, Dec 08 2009

Keywords

Comments

This is a permutation of the positive integers. Sequence A175060 is its inverse permutation.

Crossrefs

Programs

  • Mathematica
    Map[FromDigits[#, 2] &@ Flatten@ # &, Select[Array[Split@ IntegerDigits[#, 2] &, 400], FreeQ[#, {1}] &] /. w_List /; First@ w == 1 :> Most@ w] (* Michael De Vlieger, Sep 03 2017 *)

Extensions

Extended by Ray Chandler, Dec 18 2009

A173022 Number of numbers <= n whose binary representation is without isolated ones.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 16, 17, 17, 17, 18, 19, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 07 2010

Keywords

Examples

			a(20) = #{0,3,6,7,12,14,15} = #{0,11,110,111,1100,1110,1111} = 7.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Array[Boole[FreeQ[Split[IntegerDigits[#, 2]], {1}]] &, 100, 0]] (* Paolo Xausa, Oct 15 2024 *)

Formula

a(A144795(n+1)) = a(A144795(n)) + 1.
a(2^n - 1) = A005251(n+2).
A173021(n) <= a(n) <= A173023(n).

A173024 Numbers having neither isolated ones nor isolated double ones in their binary representations.

Original entry on oeis.org

0, 7, 14, 15, 28, 30, 31, 56, 60, 62, 63, 112, 119, 120, 124, 126, 127, 224, 231, 238, 239, 240, 247, 248, 252, 254, 255, 448, 455, 462, 463, 476, 478, 479, 480, 487, 494, 495, 496, 503, 504, 508, 510, 511, 896, 903, 910, 911, 924, 926, 927, 952, 956, 958, 959
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 07 2010

Keywords

Comments

Intersection of A144795 and A173025.
If m is a term then 2*m is also a term.
If m is an odd term then 2*m+1 is also a term.

Crossrefs

Programs

  • Mathematica
    nioQ[n_]:=Min[Length/@Select[Split[IntegerDigits[n,2]],FreeQ[#,0]&]]>2; Select[ Range[ 0,1000],nioQ] (* Harvey P. Dale, Jan 12 2023 *)

Formula

A173021(a(n+1)) = A173021(a(n)) + 1.

A173025 Numbers whose binary representation contains no isolated digits "11".

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 9, 10, 14, 15, 16, 17, 18, 20, 21, 23, 28, 29, 30, 31, 32, 33, 34, 36, 37, 39, 40, 41, 42, 46, 47, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 68, 69, 71, 72, 73, 74, 78, 79, 80, 81, 82, 84, 85, 87, 92, 93, 94, 95, 112, 113, 114, 116, 117, 119, 120, 121, 122
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 07 2010

Keywords

Crossrefs

A173024 is a subsequence.

Programs

  • Mathematica
    Select[Range[0, 150], FreeQ[Split[IntegerDigits[#, 2]], {1, 1}] &] (* Paolo Xausa, Oct 15 2024 *)

Formula

A173021(a(n+1)) = A173021(a(n)) + 1.

A144794 A positive integer n is included if every 0 in binary n is next to at least one other 0.

Original entry on oeis.org

4, 8, 9, 12, 16, 17, 19, 24, 25, 28, 32, 33, 35, 36, 39, 48, 49, 51, 56, 57, 60, 64, 65, 67, 68, 71, 72, 73, 76, 79, 96, 97, 99, 100, 103, 112, 113, 115, 120, 121, 124, 128, 129, 131, 132, 135, 136, 137, 140, 143, 144, 145, 147, 152, 153, 156, 159, 192, 193, 195, 196
Offset: 1

Views

Author

Leroy Quet, Sep 21 2008

Keywords

Comments

n is included if A144789(n) >= 2.

Crossrefs

Programs

  • Maple
    A007814 := proc(n) local nshf,a ; a := 0 ; nshf := n ; while nshf mod 2 = 0 do nshf := nshf/2 ; a := a+1 ; od: a ; end: A144789 := proc(n) option remember ; local lp2,lp2sh,bind ; bind := convert(n,base,2) ; if add(i,i=bind) = nops(bind) then RETURN(0) ; fi; lp2 := A007814(n) ; if lp2 = 0 then A144789(floor(n/2)) ; else lp2sh := A144789(n/2^lp2) ; if lp2sh = 0 then lp2 ; else min(lp2,lp2sh) ; fi; fi; end: isA144794 := proc(n) RETURN(A144789(n) >= 2) ; end: for n from 3 to 400 do if isA144794(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 29 2008
  • Mathematica
    Select[Range@ 200, And[Union@ # != {1}, AllTrue[Map[Length, Select[Split@ #, First@ # == 0 &]], # > 1 &]] &@ IntegerDigits[#, 2] &] (* Michael De Vlieger, Aug 20 2017 *)

Extensions

Extended by R. J. Mathar, Sep 29 2008

A336880 Numbers with decimal expansion d_1, ..., d_w such that for any k in 1..w there is some m in 1..w such that d_k = d_m = abs(k - m).

Original entry on oeis.org

0, 11, 110, 111, 202, 1100, 1110, 1111, 2020, 2222, 3003, 3113, 11000, 11011, 11100, 11110, 11111, 11202, 20200, 20202, 20211, 22220, 22222, 23203, 30030, 30232, 31130, 33033, 40004, 40114, 41104, 41114, 42024, 110000, 110011, 110110, 110111, 110202, 111000
Offset: 1

Views

Author

Rémy Sigrist, Aug 06 2020

Keywords

Comments

This sequence has similarities with A336668.
All repunits (A002275) belong to this sequence.
The concatenation of two terms is also a term.
The digit reversal (A004086) of a term is also a term.
For any d in 1..9, d * (1 + 10^d) is the first term containing the digit d.

Examples

			Regarding 30232:
- the first digit 3 is 3 positions away from the second digit 3 and vice versa,
- the digit 0 matches itself,
- the first digit 2 is 2 positions away from the second digit 2 and vice versa,
- so 30232 belongs to this sequence.
		

Crossrefs

Cf. A002275, A144795 (binary analog), A336668.

Programs

  • PARI
    is(n, base=10) = { my (d=digits(n, base)); for (k=1, #d, if ((k-d[k]<1 || d[k-d[k]]!=d[k]) && (k+d[k]>#d || d[k+d[k]]!=d[k]), return (0)));
    return (1) }

A377169 Nonnegative integers containing isolated ones in their binary representation.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 10, 11, 13, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 29, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 52, 53, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Paolo Xausa, Oct 18 2024

Keywords

Comments

A 1 is isolated if it's not adjacent to another 1.

Examples

			19 is a term because 19 = 10011_2 contains one isolated 1.
74 is a term because all ones in 74 = 1001010_2 are isolated.
		

Crossrefs

Complement of A144795.

Programs

  • Mathematica
    Select[Range[150], MemberQ[Split[IntegerDigits[#, 2]], {1}] &]

A289194 Lexicographically earliest sequence of distinct positive terms such that the product of two consecutive terms has no isolated 1 in its base-2 representation.

Original entry on oeis.org

1, 3, 2, 6, 4, 7, 8, 12, 5, 11, 9, 14, 16, 15, 13, 19, 21, 22, 10, 23, 17, 24, 18, 27, 29, 30, 26, 35, 52, 38, 25, 31, 32, 28, 33, 47, 34, 46, 20, 39, 40, 44, 36, 43, 37, 48, 41, 75, 53, 59, 61, 54, 57, 55, 58, 60, 64, 51, 65, 56, 66, 62, 50, 71, 45, 78, 42
Offset: 1

Views

Author

Rémy Sigrist, Jun 28 2017

Keywords

Comments

A144795 gives the numbers without isolated 1's in base-2 representation.
This sequence is conjectured to be a permutation of the natural numbers.
This sequence has similarities with A269361: here we require that the product of two consecutive terms has no isolated 1, there the product of two consecutive terms has only isolated 1's, in base-2 representation.
For any k > 0:
- a(2*k-1) belongs to A091072,
- a(2*k) belongs to A091067.

Examples

			The first terms, alongside a(n)*a(n+1) in binary, are:
n       a(n)    a(n)*a(n+1) in binary
--      ----    ---------------------
1       1       11
2       3       110
3       2       1100
4       6       11000
5       4       11100
6       7       111000
7       8       1100000
8       12      111100
9       5       110111
10      11      1100011
11      9       1111110
12      14      11100000
13      16      11110000
14      15      11000011
15      13      11110111
16      19      110001111
17      21      111001110
18      22      11011100
19      10      11100110
20      23      110000111
		

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[k = 1; While[Nand[! MemberQ[a, k], ! MemberQ[Length /@ DeleteCases[Split[IntegerDigits[k Last[a], 2]], s_ /; First@ s == 0], 1]], k++]; AppendTo[a, k], {n, 2, 67}]; a (* Michael De Vlieger, Jun 29 2017 *)
Showing 1-8 of 8 results.