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.

A323455 Irregular triangle read by rows: row n lists the numbers that can be obtained from the binary expansion of n by inserting a single 0 after any 1.

Original entry on oeis.org

2, 4, 5, 6, 8, 9, 10, 10, 12, 11, 13, 14, 16, 17, 18, 18, 20, 19, 21, 22, 20, 24, 21, 25, 26, 22, 26, 28, 23, 27, 29, 30, 32, 33, 34, 34, 36, 35, 37, 38, 36, 40, 37, 41, 42, 38, 42, 44, 39, 43, 45, 46, 40, 48, 41, 49, 50, 42, 50, 52, 43, 51, 53, 54, 44, 52, 56
Offset: 1

Views

Author

N. J. A. Sloane, Jan 16 2019

Keywords

Comments

All the numbers in row n have the same binary weight (A000120) as n.

Examples

			From 7 = 111 we can get 1011 = 11, 1101 = 13, and 1110 = 14, so row 7 is {11,13,14}.
The triangle begins:
  2,
  4,
  5, 6,
  8,
  9, 10,
  10, 12,
  11, 13, 14,
  16,
  17, 18,
  18, 20,
  19, 21, 22,
  ...
		

Crossrefs

Cf. A000120. See A323456 for a closely related sequence, the binary analog of A323386.

Programs

  • Mathematica
    r323455[n_] := Module[{digs=IntegerDigits[n, 2]}, Map[FromDigits[#, 2]&, Map[Insert[digs, 0, #+1]&, Flatten[Position[digs, 1]]]]] (* nth row *)
    a323455[{m_, n_}] := Flatten[Map[r323455, Range[m, n]]]
    a323455[{1, 28}] (* Hartmut F. W. Hoft, Oct 24 2023 *)
  • Python
    def row(n):
        b = bin(n)[2:]
        s = set(b[:i+1] + "0" + b[i+1:] for i in range(len(b)) if b[i] == "1")
        return sorted(int(w, 2) for w in s)
    print([c for n in range(1, 29) for c in row(n)]) # Michael S. Branicky, Jul 24 2022

Extensions

More terms from David Consiglio, Jr., Jan 17 2019
a(49) and beyond from Michael S. Branicky, Jul 24 2022

A323388 a(n) = b(n+1)/b(n) - 1 where b(1)=3 and b(k) = b(k-1) + lcm(floor(sqrt(3)*k), b(k-1)).

Original entry on oeis.org

1, 5, 1, 1, 5, 1, 13, 5, 17, 19, 1, 11, 1, 5, 1, 29, 31, 1, 17, 1, 19, 13, 41, 43, 1, 23, 1, 1, 17, 53, 1, 19, 29, 1, 31, 1, 13, 67, 23, 71, 1, 37, 1, 1, 79, 1, 83, 1, 43, 1, 1, 13, 31, 1, 1, 1, 1, 1, 103, 1, 107, 109, 1, 1, 1, 29, 1, 1, 1, 61, 1, 1
Offset: 1

Views

Author

Pedja Terzic, Jan 13 2019

Keywords

Comments

Conjectures:
1. This sequence consists only of 1's and primes.
2. Every odd prime of the form floor(sqrt(3)*m) greater than 3 is a term of this sequence.
3. At the first appearance of each prime of the form floor(sqrt(3)*m), it is larger than any prime that has already appeared.
The 2nd and 3rd conjectures are proved at the Mathematics Stack Exchange link. - Sungjin Kim, Jul 17 2019

Crossrefs

Cf. A184796 (primes of the form floor(sqrt(3)*m)).

Programs

  • PARI
    Generator(n)={b1=3; list=[]; for(k=2, n, b2=b1+lcm(floor(sqrt(3)*k), b1); a=b2/b1-1; list=concat(list,a); b1=b2); print(list)}
    
  • PARI
    lista(nn)={my(b1=3, b2, va=vector(nn)); for(k=2, nn+1, b2=b1+lcm(sqrtint(3*k^2), b1); va[k-1]=b2/b1-1; b1=b2); va}; \\ Michel Marcus, Aug 20 2022

A323359 a(n) = b(n+1)/b(n) - 1 where b(1)=2 and b(k) = b(k-1) + lcm(floor(sqrt(k^3)), b(k-1)).

Original entry on oeis.org

1, 5, 1, 11, 7, 1, 11, 1, 31, 1, 41, 23, 13, 29, 1, 1, 19, 41, 89, 1, 103, 11, 1, 1, 11, 1, 37, 1, 41, 43, 181, 1, 1, 23, 1, 1, 1, 1, 1, 131, 17, 281, 97, 43, 311, 23, 83, 1, 353, 1, 17, 1, 1, 37, 419, 43, 1, 151, 29, 17, 61, 1, 1, 131, 67, 137, 1, 191, 1, 1, 61, 89
Offset: 1

Views

Author

Pedja Terzic, Jan 12 2019

Keywords

Comments

Conjectures:
1. This sequence consists only of 1's and primes.
2. Every odd prime of the form floor(sqrt(m^3)) is a term of this sequence.
3. At the first appearance of each prime of the form floor(sqrt(m^3)), it is the next prime after the largest prime that has already appeared.
Record values appear to be A291139(m), m > 1. - Bill McEachen, Jun 23 2023

Crossrefs

Programs

  • PARI
    Generator(n)={b1=2;list=[]; for(k=2, n, b2=b1+lcm(sqrtint(k^3),b1); a=b2/b1-1; list=concat(list,a);b1=b2); return(list)}
Showing 1-3 of 3 results.