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

A167500 List of nonzero bits in this sequence (when terms are written in binary and concatenated).

Original entry on oeis.org

1, 2, 4, 7, 8, 9, 10, 14, 17, 18, 20, 22, 23, 24, 26, 30, 31, 34, 36, 38, 41, 43, 44, 46, 48, 49, 50, 51, 52, 56, 57, 59, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 75, 77, 80, 83, 86, 87, 89, 91, 94, 95, 97, 99, 100, 101, 103, 104, 107, 109, 110, 111, 113, 114, 119, 120, 124
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2009

Keywords

Comments

Numbers are written in base 2 in the usual way, starting with the most significant bit (MSB).
The sequence starts at index 1 since it is a list. The sequence cannot start with a(1)=0, else the 0th bit would not be nonzero. Thus we don't have the choice of numbering the bits starting from zero, and the first bit is necessarily set (the MSB of the first term which is nonzero), i.e., a(1)=1.

Examples

			The term which follows a(1)=1 (cf. comment) will be nonzero and thus have a nonzero MSB, which is the bit that comes right after the initial 1, thus bit # 2 is nonzero, therefore a(2)=2.
This term is written 10 in base 2, so the third bit of the sequence is zero, but the 4th bit, which will follow, will be the MSB of a(3) which is nonzero, thus a(3)=4.
The 4th bit is followed by two zero bits (since 4 = 100[2]), but the 7th bit is the MSB of the next term, thus nonzero, and therefore a(4)=7.
Since 7=111[2], the 8th and 9th bits are also set, i.e., the sequence continues a(5)=8, a(6)=9, and from now on, there is always a growing number of subsequent bits already written down.
		

Crossrefs

Cf. A167501 (the sequence of bits of this sequence), A167502 (this sequence written in binary).

Programs

  • PARI
    a=b=[]; for(n=1,99, #b >= n & for( i=a[n-1]+1,#b, b[i] & (a=concat(a,i)) & break); #a
    				

A167520 Positions of nonzero digits in this sequence, when all terms are concatenated.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 05 2009

Keywords

Comments

Numbers are written in base 10 in the usual way; the terms give the positions of the nonzero digits when all terms are concatenated.
The sequence starts at index 1 since it is a list. The sequence cannot start with a(1)=0, this would mean that the first nonzero digit occurs at position 0, which does not make sense, or at best is a contradiction. Thus we cannot number the positions starting from zero, and the first digit (most significant digit of the first term) is necessarily nonzero, i.e. a(1)=1.

Examples

			The term which follows a(1)=1 (cf. comment) will be nonzero and thus have a nonzero most significant digit, which is the digit that comes right after the initial 1, thus digit # 2 is nonzero, therefore a(2)=2.
This goes on the like up to a(10)=10 (this refers to the most significant digit of the 10th term, which is necessarily nonzero). But the first digit of this "10" is followed by the digit '0', so the next nonzero digit is not at position 11, but it will come in the following position, a(11)=12.
From here on, there is always an increasing number of subsequent digits already written down, and it is sufficient to list the positions of the digits different from '0'.
		

Crossrefs

Cf. A167500 and A167502 (analog for base 2).

Programs

  • PARI
    base(n,b=10) = { local( a=[ n%b ]); while( 0= n & for( i=a[n-1]+1,#b, b[i] & (a=concat(a,i)) & break); #a
    				

A167501 Sequence of bits in A167500 (= list of nonzero bits in this sequence, when written in binary).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 05 2009

Keywords

Comments

Sequence A167500 starts 1,2,4,7,... = 1,10,100,111,.... when written in binary (A167502). This sequence lists the bits one by one, MSB first: 1,1,0,1,0,0,1,1,1,...; by definition A167500 lists the nonzero terms of this function, and reciprocally this sequence is the characteristic function of A167500.

Crossrefs

Cf. A167500 (lists nonzero terms in this sequence), A167502.

Programs

  • PARI
    a=b=[]; for(n=1,30, #b >= n & for( i=a[n-1]+1,#b, b[i] & (a=concat(a,i)) & break); #a
    				

A287515 a(n) = position of n-th 0 when sequence is written in base 2.

Original entry on oeis.org

2, 7, 8, 9, 11, 12, 15, 20, 21, 27, 29, 30, 32, 34, 38, 44, 50, 52, 53, 54, 55, 56, 58, 59, 60, 62, 64, 65, 68, 70, 73, 74, 77, 78, 80, 83, 85, 86, 89, 91, 95, 98, 101, 108, 109, 110, 114, 116, 120, 127, 128, 134, 136, 137, 138, 139, 140, 141, 143, 144, 145, 146, 147, 150, 151, 152, 154, 155, 157, 158, 159, 162
Offset: 1

Views

Author

Anthony Sand, May 26 2017

Keywords

Comments

A167500 lists the positions of 1's when the sequence is written in binary. This sequence lists the positions of 0's. When written in binary, it begins 10, 111, 1000, 1001, 1011... The first 0 appears at position 2, so a(1) = 2 = 10. The second 0 appears at position 7, so a(2) = 7 = 111. The third 0 appears at position 8, so a(3) = 8 = 1000. The sequence then becomes self-generating, because entries are added to it faster than 0's are detected in it.

Examples

			a(1) = zeropos([10...],1) = 2,
a(2) = zeropos([10,111,1000...],2) = 7,
a(3) = zeropos([10,111,1000...],3) = 8,
a(4) = zeropos([10,111,1000...],4) = 9,
a(5) = zeropos([10,111,1000,1001...],5) = 11.
		

Crossrefs

Programs

  • PARI
    { zeroposseq()= smx=100; s=vector(smx); s[1]=2; s[2]=7; s[3]=8; si=0; dig=digits(s[1],2); di=1; i=1; dl=0; while(si#dig, di++; dig=digits(s[di],2); i=1; ); ); }

Formula

a(n) = zeropos([sequence],n).

A167522 Positive integers not occurring in A167500.

Original entry on oeis.org

3, 5, 6, 11, 12, 13, 15, 16, 19, 21, 25, 27, 28, 29, 32, 33, 35, 37, 39, 40, 42, 45, 47, 53, 54, 55, 58, 60, 65, 72, 73, 74, 76, 78, 79, 81, 82, 84, 85, 88, 90, 92, 93, 96, 98, 102, 105, 106, 108, 112, 115, 116, 117, 118, 121, 122, 123, 127, 128, 130, 133, 134, 139, 141
Offset: 1

Views

Author

M. F. Hasler, Nov 05 2009

Keywords

Comments

Equivalently, positions of zero digits in A167502 (when all terms are concatenated).

Crossrefs

Programs

  • PARI
    {a=b=[]; for(n=1,99, #b>=n & for(i=a[n-1]+1,#b,b[i] & (a=concat(a,i)) & break); #a
    				
Showing 1-5 of 5 results.