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-3 of 3 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

A174203 In the sequence A007088 of binary representations of n, delete the 1st, 3rd, 5th, 7th, 9th etc occurrence of 0 and 1. Rewrite the bits left over in base 10.

Original entry on oeis.org

2, 1, 0, 1, 2, 3, 0, 2, 2, 5, 2, 1, 6, 3, 0, 2, 4, 5, 2, 1, 5, 3, 2, 2, 5, 5, 2, 3, 6, 7, 0, 4, 4, 9, 2, 1, 10, 3, 4, 2, 10, 5, 2, 5, 5, 11, 4, 2, 10, 5, 2, 5, 5, 11, 2, 6, 6, 13, 6, 3, 14, 7, 0, 4, 8, 9, 2, 1, 9, 3, 2, 2, 9, 5, 2, 5, 10, 11, 4
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			Numbers in base 2: 0, 1, 10, 11, 100, 101, 110, 111, 1000, .... Delete odd occurrences of 0 (replaced by ~): ~, 1, 10, 11, 1~0, 1~1, 110, 111, 1~0~ Delete odd occurrences of 1 (replaced by ~): ~, ~, 10, ~1, ~~0, 1~~, 1~0, 1~1, ~~0~.
The pieces left are 10, 1, 0, 1, 10, 11, 0, ... which is in base 10: 2, 1, 0, 1, 2, 3, 0, ....
		

Crossrefs

Programs

  • Maple
    n1 := 1 ; n0 := 1 ;
    for n from 0 to 80 do
            if n = 0 then b := [0] ; else b := convert(n,base,2) ; end if;
            for d from nops(b) to 1 by -1 do
                    if op(d,b) = 0 then
                            if type(n0,'odd') then b := subsop(d=NULL,b) ; end if; n0 := n0+1 ;
                    else
                            if type(n1,'odd') then b := subsop(d=NULL,b) ; end if; n1 := n1+1 ;
                    end if;
            end do:
            add(2^(i-1)*op(i,b),i=1..nops(b)) ; printf("%d,",%) ;
    end do: # R. J. Mathar, Nov 23 2010

Extensions

Sequence extended, keyword:base,less added by R. J. Mathar, Nov 23 2010

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
Showing 1-3 of 3 results.