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

A115422 Integers n > 0 such that n XOR 20*n = 21*n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 32, 33, 36, 48, 64, 65, 66, 67, 72, 73, 96, 97, 128, 129, 130, 131, 132, 134, 144, 146, 192, 193, 194, 195, 256, 257, 258, 259, 260, 262, 264, 265, 268, 288, 289, 292, 384, 385, 386, 387, 388, 390, 512, 513, 514, 515, 516, 518
Offset: 1

Views

Author

Paul D. Hanna, Jan 22 2006

Keywords

Comments

n is in the sequence iff 2*n is in the sequence. - Robert Israel, Nov 11 2016

Crossrefs

Cf. A003714 (Fibbinary numbers), A048715, A048718, A115423, A115424.

Programs

Formula

This sequence also seems to satisfy:
5*a(n) XOR 16*a(n) = 21*a(n);
5*a(n) XOR 17*a(n) = 20*a(n); etc.
a(A224809(n+4)) = 2^n. - Gheorghe Coserea, Nov 11 2016

A115423 Integers n > 0 such that n XOR 30*n = 31*n.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 33, 64, 65, 66, 128, 129, 130, 132, 256, 257, 258, 260, 264, 512, 513, 514, 516, 520, 528, 1024, 1025, 1026, 1028, 1032, 1040, 1056, 1057, 2048, 2049, 2050, 2052, 2056, 2064, 2080, 2081, 2112, 2113, 2114, 4096, 4097, 4098, 4100, 4104, 4112
Offset: 1

Views

Author

Paul D. Hanna, Jan 22 2006

Keywords

Crossrefs

Cf. A003714 (Fibbinary numbers), A048715, A048718, A115422, A115424.

Programs

Formula

This sequence also seems to satisfy:
3*a(n) XOR 21*a(n) = 22*a(n);
5*a(n) XOR 19*a(n) = 22*a(n);
6*a(n) XOR 19*a(n) = 21*a(n); etc.
a(A003520(n+4)) = 2^n. - Gheorghe Coserea, Nov 11 2016

A342697 For any number n with binary expansion Sum_{k >= 0} b(k) * 2^k, the binary expansion of a(n) is Sum_{k >= 0} floor((b(k) + b(k+1) + b(k+2))/2) * 2^k.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 3, 3, 0, 0, 2, 3, 6, 7, 7, 7, 0, 0, 0, 1, 4, 5, 7, 7, 12, 12, 14, 15, 14, 15, 15, 15, 0, 0, 0, 1, 0, 1, 3, 3, 8, 8, 10, 11, 14, 15, 15, 15, 24, 24, 24, 25, 28, 29, 31, 31, 28, 28, 30, 31, 30, 31, 31, 31, 0, 0, 0, 1, 0, 1, 3, 3, 0, 0, 2, 3, 6
Offset: 0

Views

Author

Rémy Sigrist, Mar 18 2021

Keywords

Comments

The value of the k-th bit in a(n) corresponds to the most frequent value in the bit triple starting at the k-th bit in n.

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     0       1          0
   2     0      10          0
   3     1      11          1
   4     0     100          0
   5     1     101          1
   6     3     110         11
   7     3     111         11
   8     0    1000          0
   9     0    1001          0
  10     2    1010         10
  11     3    1011         11
  12     6    1100        110
  13     7    1101        111
  14     7    1110        111
  15     7    1111        111
		

Crossrefs

Programs

  • Mathematica
    A342697[n_] := Quotient[7*n - BitXor[n, 2*n, 4*n], 8];
    Array[A342697, 100, 0] (* Paolo Xausa, Aug 06 2025 *)
  • PARI
    a(n) = sum(k=0, #binary(n), ((bittest(n, k)+bittest(n, k+1)+bittest(n, k+2))>=2) * 2^k)

Formula

a(n) = 0 iff n belongs to A048715.
a(n) = floor(A048730(n)/8) = floor(A048733(n)/2). - Kevin Ryde, Mar 26 2021

A350311 Replace 2^k in the binary expansion of n with A000930(k+2), Narayana's cows sequence.

Original entry on oeis.org

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

Views

Author

A.H.M. Smeets, Dec 24 2021

Keywords

Comments

A048715(n) = m, if and only if a(n) = m and for all k > n a(k) > m.

Crossrefs

Cf. A022290 (analog for Fibonacci numbers).

Programs

  • Maple
    b:= (n, i, j, k)->`if`(n=0, 0, k*irem(n, 2, 'q')+b(q, j, k, i+k)):
    a:= n-> b(n, 1$3):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 26 2022
  • PARI
    my(p=Mod('x,'x^3-'x^2-1)); a(n) = vecsum(Vec(lift(subst(Pol(binary(n))*'x^2,'x,p)))); \\ Kevin Ryde, Dec 26 2021
  • Python
    def Interpretation(n):
        f0, f1, f2, r = 1, 1, 1, 0
        while n > 0:
            if n%2 == 1:
                r = r+f0
            n, f0, f1, f2 = n//2, f0+f2, f0, f1
        return r
    n = 0
    while n <= 69:
        print(Interpretation(n), end = ", ")
        n += 1
    

A350312 Narayana weighted representation of n (the bottom version). Also binary representation of numbers not containing 00 or 010 as a substring.

Original entry on oeis.org

0, 1, 10, 11, 101, 110, 111, 1011, 1101, 1110, 1111, 10110, 10111, 11011, 11101, 11110, 11111, 101101, 101110, 101111, 110110, 110111, 111011, 111101, 111110, 111111, 1011011, 1011101, 1011110, 1011111, 1101101, 1101110, 1101111, 1110110, 1110111, 1111011
Offset: 0

Views

Author

A.H.M. Smeets, Dec 24 2021

Keywords

Comments

a(n) equals binary representation of m, if and only if A350311(m) = n and for all k < m, A350311(k) < n.

Crossrefs

Cf. A000930, A048715, A350215 (top version), A350311.
Fibonacci representations: A014417 (Zeckendorf), A104326 (dual Zeckendorf).

Programs

  • Mathematica
    q[n_] := SequenceCount[IntegerDigits[n, 2], #] & /@ {{0, 0}, {0, 1, 0}} == {0, 0}; bin[n_] := FromDigits[IntegerDigits[n, 2]]; bin /@ Select[Range[0, 120], q] (* Amiram Eldar, Jan 27 2022 *)
  • Python
    # first method (as from definition)
    def A101(n):
        f0, f1, f2, r = 1, 1, 1, 0
        while n > 0:
            if n%2 == 1:
                r = r+f0
            n, f0, f1, f2 = n//2, f0+f2, f0, f1
        return r
    n, a = 0, 0
    while n < 36:
        if A101(a) == n:
            print(bin(a)[2:], end = ", ")
            n += 1
        a += 1
    
  • Python
    # second method (as from regular expression)
    def test(n):
        s, i, n1 = bin(n)[2:], 0, 2
        while i < len(s):
            if s[i] == "0":
                if n1 < 2:
                    return 0
                n1 = 0
            else:
                n1 += 1
            i += 1
        return 1
    n, a = 0, 0
    while n < 36:
        if test(a):
            print(bin(a)[2:], end = ", ")
            n += 1
        a += 1

Formula

Regular expression: 0|11*(0111*)*(0|01|011*)?.
Previous Showing 11-15 of 15 results.