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.

A343181 Binary word formed from first 2^n-1 terms of paper-folding sequence A014577.

Original entry on oeis.org

1, 110, 1101100, 110110011100100, 1101100111001001110110001100100, 110110011100100111011000110010011101100111001000110110001100100
Offset: 1

Views

Author

N. J. A. Sloane, May 05 2021

Keywords

Comments

Take a sheet of paper, and fold the right edge up and onto the left edge. Do this n times. and unfold. Write a 1 for every valley and a 0 for every ridge.
This appears on the first page of Davis-Knuth (1970/2010) and in many subsequent papers on paper-folding.
a(7) is too large to include in the DATA section.

References

  • Chandler Davis and Donald E. Knuth, Number Representations and Dragon Curves -- I and II, Journal of Recreational Mathematics, volume 3, number 2, April 1970, pages 66-81, and number 3, July 1970, pages 133-149. Reprinted in Donald E. Knuth, Selected Papers on Fun and Games, CSLI Publications, 2010, pages 571-614.
  • Rémy Sigrist and N. J. A. Sloane, Two-Dimensional Paper-Folding, Manuscript in preparation, May 2021.

Crossrefs

When converted to base 10 we get A337580.

A343183 A343182(n) converted from base 2 to base 10.

Original entry on oeis.org

0, 4, 100, 27748, 1826909284, 7846656366854040676, 144745261873314177466380711909411548260, 49254260310842419635956203183145610297181518175722645092459215139793457671268
Offset: 0

Views

Author

N. J. A. Sloane, May 06 2021

Keywords

Crossrefs

A348162 a(n) is the previous term in binary with 0's and 1's put alternatingly before each digit, starting with 0.

Original entry on oeis.org

0, 0, 2, 38, 9782, 641083190, 2753431335706502966, 50791843174310108512166439539235563318, 17283568615631356151658578642396687258566665947274335391075779120894446085942
Offset: 0

Views

Author

Edward Green, Oct 03 2021

Keywords

Comments

The next term is too large to include.
The actual sequence in binary is 0, 00, 0010, 00100110, ... The 0s at the start of each term are required for the sequence to work.

Examples

			a(2) = 0010;
a(3) = (0010 + 0101 -> 00100110);
a(4) = (00100110 + 01010101 = 0010011000110110).
Full explanation:
Say we have the term 0010.
We get an equal length binary number of alternating 0s and 1s.
In this case it would be 0101, and we interlace them like so:
                0   1   0   1
0010 + 0101 ->    0   0   1   0  -> 00100110
		

Crossrefs

Cf. A014707 (bits of terms), A337580.

Programs

  • PARI
    a(n) = my(ret=0,s=1); for(i=2,n, ret += 1<Kevin Ryde, Nov 19 2021
  • Python
    def combine(a,b):
      c = ''
      for i in range(max(len(a),len(b))*2):
       if i%2 == 0:
        if len(a) > i/2:
         c += (a[int(i/2)])
       else:
        if len(b) > i/2:
         c += (b[int(i/2)])
      return c
    x = '0'
    while True:
      x = combine(combine(len(x)*'0',len(x)*'1')[:len(x)],x)
    
  • Python
    from itertools import islice
    def A348162(): # generator of terms
        s = '0'
        while True:
            yield int(s,2)
            s = ''.join(x+y for x, y in zip('01'*((len(s)+1)//2),s))
    A348162_list = list(islice(A348162(),9)) # Chai Wah Wu, Nov 19 2021
    
Showing 1-3 of 3 results.