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.

Previous Showing 11-13 of 13 results.

A365538 a(0) = 1; otherwise, for i >= 0, a(4i+0) = a(4i+1) = a(2i), a(4i+2) = 2*a(2i+1), a(4i+3) = 0.

Original entry on oeis.org

1, 1, 2, 0, 2, 2, 0, 0, 2, 2, 4, 0, 0, 0, 0, 0, 2, 2, 4, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 0, 4, 4, 0, 0, 4, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Roland Kneer, Oct 23 2023

Keywords

Comments

Related to a model of X-chromosome inheritance:
The two X chromosomes of a female are inherited one from each parent, while the X chromosome of a male is always inherited from his mother. Thus, the probability distribution of inheritance from the parents (mother, father) is (0.5, 0.5) for a female and (1, 0) for a male. For the inheritance of any X-chromosome of a female from the 2^i ancestors of the i-th generation before (right to left on an ahnentafel), the distribution is given by the first 2^i terms of the sequence, divided by 2^i. For example, the X-chromosome of a man, which was inherited from his mother, was inherited from his mother's 16 great-great-grandparents with probabilities 1/16, 1/16, 1/8, 0, 1/8, 1/8, 0, 0, 1/8, 1/8, 1/4, 0, 0, 0, 0, 0.

Crossrefs

Positions of 0's: A004780 (complement of A003714).

Formula

This sequence regarded as a triangle with rows of lengths 1, 1, 2, 4, 8, 16, ...:
1;
1;
2, 0;
2, 2, 0, 0;
2, 2, 4, 0, 0, 0, 0, 0;
2, 2, 4, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
...

A300302 Square array T(n, k) (n >= 1, k >= 1) read by antidiagonals upwards: T(n, k) is the k-th positive number whose binary representation contains the binary representation of n as a substring.

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 4, 6, 5, 4, 5, 8, 7, 6, 5, 6, 10, 9, 11, 8, 6, 7, 12, 11, 12, 12, 9, 7, 8, 14, 13, 13, 16, 13, 10, 8, 9, 16, 15, 14, 20, 17, 14, 11, 9, 10, 18, 17, 23, 22, 21, 18, 15, 12, 10, 11, 20, 19, 24, 28, 24, 22, 19, 19, 13, 11, 12, 22, 21, 25, 32, 29
Offset: 1

Views

Author

Rémy Sigrist, Mar 08 2018

Keywords

Comments

Each positive number k appears A122953(k) times in this array.

Examples

			Square array begins:
  n\k|    1    2    3    4    5    6    7    8    9   10
  ---+--------------------------------------------------
    1|    1    2    3    4    5    6    7    8    9   10  <--  A000027
    2|    2    4    5    6    8    9   10   11   12   13  <--  A062289
    3|    3    6    7   11   12   13   14   15   19   22  <--  A004780
    4|    4    8    9   12   16   17   18   19   20   24  <--  A004753
    5|    5   10   11   13   20   21   22   23   26   27  <--  A004748
    6|    6   12   13   14   22   24   25   26   27   28  <--  A004749
    7|    7   14   15   23   28   29   30   31   39   46  <--  A004781
    8|    8   16   17   24   32   33   34   35   40   48  <--  A004779
    9|    9   18   19   25   36   37   38   39   41   50
   10|   10   20   21   26   40   41   42   43   52   53  <--  A132782
		

Crossrefs

Programs

  • Perl
    See Links section.

Formula

T(n, 1) = n.
T(n, 2) = 2*n.
T(n, 3) = 2*n + 1.
T(1, n) = A000027(n).
T(2, n) = A062289(n).
T(3, n) = A004780(n).
T(4, n) = A004753(n).
T(5, n) = A004748(n).
T(6, n) = A004749(n).
T(7, n) = A004781(n).
T(8, n) = A004779(n-1).
T(10, n) = A132782(n).

A348556 Binary expansion contains 4 adjacent 1's.

Original entry on oeis.org

15, 30, 31, 47, 60, 61, 62, 63, 79, 94, 95, 111, 120, 121, 122, 123, 124, 125, 126, 127, 143, 158, 159, 175, 188, 189, 190, 191, 207, 222, 223, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 271, 286, 287, 303, 316, 317, 318
Offset: 1

Views

Author

Keywords

Comments

For k > 0, each term m = 2^(k+3) - 1 is the end of a run of A083593(k-1) consecutive terms. For k = 4, from a(13) = 120 up to a(20) = 2^7-1 = 127, there are A083593(3) = 8 consecutive terms corresponding to 1111000, 1111001, 1111010, 1111011, 1111100, 1111101, 111110 and 1111111. - Bernard Schott, Feb 20 2022

Crossrefs

Binary expansion contains k adjacent 1s: A000027 (1), A004780 (2), A004781 (3), this sequence (4).
Subsequences: A110286, A195744.

Programs

  • Maple
    q:= n-> verify([1$4], Bits[Split](n), 'sublist'):
    select(q, [$0..400])[];  # Alois P. Heinz, Oct 22 2021
  • Mathematica
    Select[Range[300], StringContainsQ[IntegerString[#, 2], "1111"] &] (* Amiram Eldar, Oct 22 2021 *)
  • PARI
    is(n)=n=bitand(n,n<<2); !!bitand(n,n<<1);
    
  • Python
    def ok(n): return "1111" in bin(n)
    print([k for k in range(319) if ok(k)]) # Michael S. Branicky, Oct 22 2021

Formula

a(n) ~ n.
a(n+1) <= a(n) + 16.
Previous Showing 11-13 of 13 results.