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

A174210 In the sequence of nonnegative natural numbers delete every 2nd, 4th, 6th, 8th... occurrence of each individual digit 0, 1, 2,.., 9.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 20, 1, 2, 23, 4, 25, 6, 27, 8, 29, 3, 3, 3, 3, 3, 40, 1, 42, 3, 4, 45, 6, 47, 8, 49, 5, 5, 5, 5, 5, 60, 1, 62, 3, 64, 5, 6, 67, 8, 69, 7, 7, 7, 7, 7, 80, 1, 82, 3, 84, 5, 86, 7, 8, 89, 9, 9, 9, 9, 9, 10, 1, 2, 103, 4, 105, 6, 107, 8, 109, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Examples

			0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
Delete even occurrences of digit 0 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,1~,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29
Delete even occurrences of digit 1 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,12,~3,14,~5,16,~7,18,~9,20,21,22,23,24,25,26,27,28,29
Delete even occurrences of digit 2 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~3,14,~5,16,~7,18,~9,20,~1,2~,23,~4,25,~6,27,~8,29
Delete even occurrences of digit 3 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~~,14,~5,16,~7,18,~9,20,~1,2~,23,~4,25,~6,27,~8,29
Delete even occurrences of digit 4 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~~,1~,~5,16,~7,18,~9,20,~1,2~,23,~4,25,~6,27,~8,29
Delete even occurrences of digit 5 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~~,1~,~~,16,~7,18,~9,20,~1,2~,23,~4,25,~6,27,~8,29
Delete even occurrences of digit 6 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~~,1~,~~,1~,~7,18,~9,20,~1,2~,23,~4,25,~6,27,~8,29
Delete even occurrences of digit 7 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~~,1~,~~,1~,~~,18,~9,20,~1,2~,23,~4,25,~6,27,~8,29
Delete even occurrences of digit 8 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~~,1~,~~,1~,~~,1~,~9,20,~1,2~,23,~4,25,~6,27,~8,29
Delete even occurrences of digit 9 (replaced by ~): 0,1,2,3,4,5,6,7,8,9,~~,1~,1~,~~,1~,~~,1~,~~,1~,~~,20,~1,2~,23,~4,25,~6,27,~8,29
Sequence defined by numbers left: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 20, 1, 2, 23, 4, 25, 6, 27, 8, 29,....
		

Crossrefs

Programs

  • Maple
    A174210aux := proc(n) option remember; local f,i,dgs ; if n < 0 then return [seq(0,i=0..9)] ; elif n = 0 then return [1,seq(0,i=1..9)] ; else f := procname(n-1) ; for dgs in convert(n,base,10) do i := op(dgs+1,f) ; f := subsop(dgs+1=i+1,f) ; end do: f ; end if; end proc:
    Lton := proc(L,b) add( op(i,L)*b^(i-1),i=1..nops(L)) ; end proc:
    A174210 := proc(n) local dgs,f,d; dgs := convert(n,base,10) ; f := A174210aux(n-1) ; for i from nops(dgs) to 1 by -1 do d := op(i,dgs) ; oldd := op(d+1,f) ; if type( 1+oldd,'even') then dgs := subsop(i=NULL,dgs) ; end if; f := subsop(d+1=oldd+1,f) ; end do: d := Lton(dgs,10) ; if d=0 and n>0 then return ; else return d; end if; end proc:
    seq(A174210(n),n=0..90) ; # R. J. Mathar, Jun 05 2011

A174205 Write natural numbers in base 2 as a stream of digits. Moving left to right, delete odd occurrences of digit 0 and 1.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1
Offset: 1

Views

Author

Keywords

Comments

The natural numbers in base 2 are 0, 1, 10, 11, 100, 101, 110, 111, 1000..... and define a stream of digits if concatenated:
0110111001011101111000 Delete odd-indexed occurrences of 0 (replaced by .):
.110111.01.11101111.0. Also delete odd-indexed occurrences of 1 (replaced by .):
..10.1..01..1.01.1..0.
The stream of bits that remain after these two rounds of deletion is chopped into single bits which define the entries of the current sequence.

Crossrefs

Programs

  • Sage
    def A174205(N=100):
        a = [0] + flatten([n.digits(base=2)[::-1] for n in IntegerRange(1,N)])
        for bit in 0, 1:
            a = [d for i,d in enumerate(a) if not (d == bit and a[:i+1].count(bit) % 2 == 1)]
        return a # D. S. McNeil, Dec 08 2010

A174207 Depleted stream of the natural numbers written in base 2: delete even occurrences of digit 0 and odd occurrences of digit 1.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0
Offset: 0

Views

Author

Keywords

Comments

The numbers in base 2: 0, 1, 10, 11, 100, 101, 110, 111, 1000, ....
The infinite stream of digits: 0110111001011101111000...
Delete even (2nd, 4th, 6th, ...) occurrences of 0 (replaced by ~):
011~1110~10111~11110~0...
Delete odd (1st, 3rd, 5th, ...) occurrences of 1 (replaced by ~):
0~1~~1~0~10~1~~1~1~0~0...
Digits remaining define the sequence: 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, ....

Crossrefs

Programs

  • Maple
    nb := 100 ;
    L := [0] ;
    for n from 1 to nb do
        nn := ListTools[Reverse](convert(n,base,2)) ;
        L := [op(L),op(nn)] ;
    end do;
    Lout := [] ;
    ie :=1 ;
    io :=1 ;
    for i from 1 to nops(L) do
        if op(i,L) =0 then
            if ie>0 then
                if type(ie,'odd') then
                    printf("%d,",0) ;
                end if;
            end if;
            ie := ie+1 ;
        else
            if io>0 then
                if type(io,'even') then
                    printf("%d,",1) ;
                end if;
            end if;
            io := io+1 ;
        end if;
    end do: # R. J. Mathar, Dec 06 2011
  • Mathematica
    nMax = 60; bits = Join @@ Table[IntegerDigits[n, 2], {n, 0, nMax}]; pos0 = Position[bits, 0] // Flatten; even0 = Partition[pos0, 2][[All, 2]]; bits2 = ReplacePart[bits, Alternatives @@ even0 -> "~"]; pos1 = Position[bits2, 1] // Flatten; odd1 = Partition[pos1, 2][[All, 1]]; DeleteCases[ ReplacePart[ bits2, Alternatives @@ odd1 -> "~"], "~"] (* Jean-François Alcover, Nov 18 2016 *)

A174204 Scan the sequence of natural numbers, written in base 2, from left to right, delete each 2nd, 4th, 6th etc occurrence of digit 0 and each 2nd, 4th, 6th etc occurrence of digit 1. The sequence are the base-10 residuals.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 5, 1, 3, 4, 1, 1, 1, 4, 5, 2, 3, 4, 5, 2, 3, 6, 5, 3, 3, 8
Offset: 0

Views

Author

Keywords

Comments

Deleting the even occurrences of 0 and the odd occurrences of 1, we get the same sequence apart from the initial three terms 0,1,1 replaced by 0.

Examples

			Numbers in base 2 (A007088):
0, 1, 10, 11, 100, 101, 110, 111, 1000.....
Delete 2nd, 4th, 6th,.. (even) occurrence of 0 (replaced by ~):
0, 1, 1~, 11, 10~, 101, 11~, 111, 10~0
Delete 2nd, 4th 6th,... (even) occurrence of 1 (replaced by ~):
0, 1, ~~, 1~, 10~, ~01, ~1~, ~1~, 10~0
The numbers left are:
0, 1, 1, 10, 1, 1, 1, 100,  and in base 10: 0, 1, 1, 2, 1, 1, 1, 4, ....as shown by a(n).
		

Crossrefs

A174206 Write natural numbers in base 2 as a stream of digits. Moving left to right, delete even occurrences of digit 0 and 1.

Original entry on oeis.org

0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Examples

			Numbers in base 2: 0, 1, 10, 11, 100, 101, 110, 111, 1000..... Stream of digits: 0110111001011101111000 Delete even occurrences of 0(replaced by ~): 011~1110~10111~11110~0 Delete even occurrences of 1(replaced by ~): 01~~1~10~~01~1~~1~10~0 Left digits: 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0,....
		

Crossrefs

A174208 Write natural numbers in base 2 as a stream of digits. Moving left to right, delete odd occurrences of digit 0 and even occurrences of digit 1.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Keywords

Examples

			Numbers in base 2: 0, 1, 10, 11, 100, 101, 110, 111, 1000.....
Stream of digits: 0110111001011101111000...
Delete odd occurrences of 0 (replace by ~): ~110111~01~11101111~0~...
Delete even occurrences of 1 (replace by ~): ~1~01~1~0~~1~10~1~1~0~...
This leaves the digits: 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0,....
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, Aug 21 2012

A174209 In the sequence of natural numbers, moving left to right, delete 1st, 3rd, 5th, 7th etc occurrence of each of the ten digits.

Original entry on oeis.org

10, 1, 2, 13, 4, 15, 6, 17, 8, 19, 2, 2, 2, 2, 2, 30, 1, 32, 3, 4, 35, 6, 37, 8, 39, 4, 4, 4, 4, 4, 50, 1, 52, 3, 54, 5, 6, 57, 8, 59, 6, 6, 6, 6, 6, 70, 1, 72, 3, 74, 5, 76, 7, 8, 79, 8, 8, 8, 8, 8, 90, 1, 92, 3, 94, 5, 96, 7, 98, 9, 0, 10, 1, 0, 1, 0, 1, 0, 1, 0, 1, 11, 12, 13, 14, 15, 16, 17
Offset: 0

Views

Author

Keywords

Examples

			Starting from
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,20,21,22,23,24,25,26,27,28,29,..
Delete odd occurrences of digit 0 (replaced by ~):
,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2~,21,22,23,24,25,26,27,28,29,..
Delete odd occurrences of digit 1 (replaced by ~):
,~,2,3,4,5,6,7,8,9,10,~1,~2,13,~4,15,~6,17,~8,19,2~,2~,22,23,24,25,26,27,28,29 ,..
Delete odd occurrences of digit 2 (replaced by ~):
,~,~,3,4,5,6,7,8,9,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~3,24,~5,26,~7,28,~9 ,..
Delete odd occurrences of digit 3 (replaced by ~):
,~,~,~,4,5,6,7,8,9,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~~,24,~5,26,~7,28,~9,..
Delete odd occurrences of digit 4 (replaced by ~):
,~,~,~,~,5,6,7,8,9,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~~,2~,~5,26,~7,28,~9,..
Delete odd occurrences of digit 5 (replaced by ~):
,~,~,~,~,~,6,7,8,9,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~~,2~,~~,26,~7,28,~9,..
Delete odd occurrences of digit 6 (replaced by ~):
,~,~,~,~,~,~,7,8,9,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~~,2~,~~,2~,~7,28,~9,..
Delete odd occurrences of digit 7 (replaced by ~):
,~,~,~,~,~,~,~,8,9,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~~,2~,~~,2~,~~,28,~9,..
Delete odd occurrences of digit 8 (replaced by ~):
,~,~,~,~,~,~,~,~,9,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~~,2~,~~,2~,~~,2~,~9,..
Delete odd occurrences of digit 9 (replaced by ~):
,~,~,~,~,~,~,~,~,~,10,~1,~2,13,~4,15,~6,17,~8,19,~~,2~,~2,~~,2~,~~,2~,~~,2~,~~,..
The residual digits define the sequence: 10, 1, 2, 13, 4, 15, 6, 17, 8, 19, 2, 2, 2, 2, 2,....
		

Crossrefs

Showing 1-7 of 7 results.