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.

A358168 First n-digit number to occur in Van Eck's Sequence (A181391).

Original entry on oeis.org

0, 14, 131, 1024, 10381, 100881, 1014748, 10001558, 100246289, 1000943528, 10010107437
Offset: 1

Views

Author

G. L. Honaker, Jr., Nov 01 2022

Keywords

Comments

a(6)-a(7) from Chuck Gaydos.

Examples

			a(2) = 14 because 14 is the first 2-digit number occurring in A181391.
		

Crossrefs

Programs

Extensions

a(8)-a(10) from Chai Wah Wu, Nov 05 2022
a(11) from Martin Ehrenstein, Nov 05 2022

A358258 First n-bit number to appear in Van Eck's sequence (A181391).

Original entry on oeis.org

0, 2, 6, 9, 17, 42, 92, 131, 307, 650, 1024, 2238, 4164, 8226, 17384, 33197, 67167, 133549, 269119, 525974, 1055175, 2111641, 4213053, 8444257, 16783217, 33601813, 67405064, 134239260, 268711604, 538400994, 1076155844, 2152693259, 4299075300, 8594396933, 17203509931
Offset: 1

Views

Author

Michael De Vlieger, Nov 05 2022

Keywords

Comments

Binary version of A358168.

Examples

			First terms written in binary, substituting "." for 0 to enhance the pattern of 1's.
   n      a(n)                   a(n)_2
  -------------------------------------
   1        0                         .
   2        2                        1.
   3        6                       11.
   4        9                      1..1
   5       17                     1...1
   6       42                    1.1.1.
   7       92                   1.111..
   8      131                  1.....11
   9      307                 1..11..11
  10      650                1.1...1.1.
  11     1024               1..........
  12     2238              1...1.11111.
  13     4164             1.....1...1..
  14     8226            1.......1...1.
  15    17384           1....11111.1...
  16    33197          1......11.1.11.1
  17    67167         1.....11..1.11111
  18   133549        1.....1..11.1.11.1
  19   269119       1.....11.11..111111
  20   525974      1........11.1..1.11.
  21  1055175     1.......11..111...111
  22  2111641    1.......111...1..11..1
  23  4213053   1.......1..1..1..1111.1
  24  8444257  1.......11.11..1.11....1
		

Crossrefs

Programs

  • Mathematica
    nn = 2^20; q[] = False; q[0] = True; a[] = 0; c[_] = -1; c[0] = 2; m = 1; {0}~Join~Rest@ Reap[Do[j = c[m]; k = m; c[m] = n; m = 0; If[j > 0, m = n - j]; If[! q[#], Sow[k]; q[#] = True] & @ IntegerLength[k, 2], {n, 3, nn}] ][[-1, -1]]
  • Python
    from itertools import count
    def A358258(n):
        b, bdict, k = 0, {0:(1,)},1< 1 else 0
        for m in count(2):
            if b >= k:
                return b
            if len(l := bdict[b]) > 1:
                b = m-1-l[-2]
                if b in bdict:
                    bdict[b] = (bdict[b][-1],m)
                else:
                    bdict[b] = (m,)
            else:
                b = 0
                bdict[0] = (bdict[0][-1],m) # Chai Wah Wu, Nov 06 2022

Extensions

a(30)-a(34) from Chai Wah Wu, Nov 06 2022
a(35) from Martin Ehrenstein, Nov 07 2022

A358259 Positions of the first n-bit number to appear in Van Eck's sequence (A181391).

Original entry on oeis.org

1, 5, 10, 24, 41, 52, 152, 162, 364, 726, 1150, 2451, 4626, 9847, 18131, 36016, 71709, 143848, 276769, 551730, 1086371, 2158296, 4297353, 8607525, 17159741, 34152001, 68194361, 136211839, 271350906, 541199486, 1084811069, 2165421369, 4331203801, 8643518017, 17303787585
Offset: 1

Views

Author

Michael De Vlieger, Nov 05 2022

Keywords

Comments

Binary version of the concept behind A358180.

Examples

			First terms written in binary, substituting "." for 0 to enhance the pattern of 1's.
   n      a(n)                   a(n)_2
  -------------------------------------
   1        1                         1
   2        5                       1.1
   3       10                      1.1.
   4       24                     11...
   5       41                    1.1..1
   6       52                    11.1..
   7      152                  1..11...
   8      162                  1.1...1.
   9      364                 1.11.11..
  10      726                1.11.1.11.
  11     1150               1...111111.
  12     2451              1..11..1..11
  13     4626             1..1....1..1.
  14     9847            1..11..111.111
  15    18131           1...11.11.1..11
  16    36016          1...11..1.11....
  17    71709         1...11......111.1
  18   143848        1...11...1111.1...
  19   276769       1....111..1..1....1
  20   551730      1....11.1.11..11..1.
  21  1086371     1....1..1..111.1...11
  22  2158296    1.....111.111.11.11...
  23  4297353   1.....11..1..1.1...1..1
  24  8607525  1.....11.1.1.111..1..1.1
  etc.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^20; q[] = False; q[0] = True; a[] = 0; c[_] = -1; c[0] = 2; m = 1; {1}~Join~Rest@ Reap[Do[j = c[m]; k = m; c[m] = n; m = 0; If[j > 0, m = n - j]; If[! q[#], Sow[n]; q[#] = True] & @ IntegerLength[k, 2], {n, 3, nn}] ][[-1, -1]]
  • Python
    from itertools import count
    def A358259(n):
        b, bdict, k = 0, {0:(1,)},1< 1 else 0
        for m in count(2):
            if b >= k:
                return m-1
            if len(l := bdict[b]) > 1:
                b = m-1-l[-2]
                if b in bdict:
                    bdict[b] = (bdict[b][-1],m)
                else:
                    bdict[b] = (m,)
            else:
                b = 0
                bdict[0] = (bdict[0][-1],m) # Chai Wah Wu, Nov 06 2022

Extensions

a(30)-a(34) from Chai Wah Wu, Nov 06 2022
a(35) from Martin Ehrenstein, Nov 07 2022
Showing 1-3 of 3 results.