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.

A178897 a(n) = n OR 10n, where OR is bitwise OR.

Original entry on oeis.org

0, 11, 22, 31, 44, 55, 62, 71, 88, 91, 110, 111, 124, 143, 142, 159, 176, 187, 182, 191, 220, 215, 222, 247, 248, 251, 286, 287, 284, 319, 318, 319, 352, 363, 374, 383, 364, 375, 382, 423, 440, 443, 430, 431, 444, 495, 494, 511, 496, 507, 502, 511, 572, 567
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 21 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := BitOr[n, 10n]; Array[f, 54, 0] (* Robert G. Wilson v, Jun 28 2010 *)

Extensions

More terms from Robert G. Wilson v, Jun 28 2010

A328105 Binary weight of A328104: a(n) = A000120(A110240(n) OR 2*A110240(n)).

Original entry on oeis.org

2, 4, 5, 8, 7, 12, 9, 15, 11, 17, 17, 20, 19, 26, 21, 29, 22, 27, 30, 33, 30, 34, 37, 40, 37, 39, 41, 49, 44, 49, 48, 53, 41, 56, 49, 64, 50, 62, 59, 66, 64, 60, 66, 69, 61, 77, 65, 73, 67, 74, 70, 89, 78, 87, 78, 94, 85, 88, 89, 100, 91, 101, 95, 110, 92, 85, 98, 102, 102, 102, 115, 109, 101, 105, 121, 118, 121, 129
Offset: 0

Views

Author

Antti Karttunen, Oct 05 2019

Keywords

Crossrefs

Programs

Formula

For all n >= 0, A070952(a) < a(n) <= 2*A070952(n).

A163618 a(2*n) = 2 * a(n). a(2*n - 1) = 2 * a(n) - 2 - (-1)^n, for all n in Z.

Original entry on oeis.org

0, 1, 2, 1, 4, 1, 2, 5, 8, 1, 2, 1, 4, 9, 10, 13, 16, 1, 2, 1, 4, 1, 2, 5, 8, 17, 18, 17, 20, 25, 26, 29, 32, 1, 2, 1, 4, 1, 2, 5, 8, 1, 2, 1, 4, 9, 10, 13, 16, 33, 34, 33, 36, 33, 34, 37, 40, 49, 50, 49, 52, 57, 58, 61, 64, 1, 2, 1, 4, 1, 2, 5, 8, 1, 2, 1, 4, 9, 10, 13, 16, 1, 2, 1, 4, 1, 2, 5, 8, 17
Offset: 0

Views

Author

Michael Somos, Aug 01 2009

Keywords

Comments

Integers n>=0 such that a(n) = 1 is A118113.
Fibbinary numbers (A003714) give all integers n>=0 for which a(n+1) = 1 or 2. - Michael Somos, Feb 21 2016

Examples

			G.f. = x + 2*x^2 + x^3 + 4*x^4 + x^5 + 2*x^6 + 5*x^7 + 8*x^8 + x^9 + 2*x^10 + ...
		

Crossrefs

Cf. A163617.

Programs

  • Mathematica
    Table[(-1)*BitOr[-n, -2*n], {n, 0, 50}] (* G. C. Greubel, Jul 30 2017 *)
  • PARI
    {a(n) = n=-n; -bitor(n, n<<1)};
    
  • PARI
    {a(n) = if( n==0 || n==1, n, 2 * a((n+1) \ 2) - (n%2) * (2 + (-1)^((n+1) \ 2)))};

Formula

a(n) = -A163617(-n) for all n in Z.

A269170 a(n) = n OR floor(n/2), where OR is bitwise-OR (A003986).

Original entry on oeis.org

0, 1, 3, 3, 6, 7, 7, 7, 12, 13, 15, 15, 14, 15, 15, 15, 24, 25, 27, 27, 30, 31, 31, 31, 28, 29, 31, 31, 30, 31, 31, 31, 48, 49, 51, 51, 54, 55, 55, 55, 60, 61, 63, 63, 62, 63, 63, 63, 56, 57, 59, 59, 62, 63, 63, 63, 60, 61, 63, 63, 62, 63, 63, 63, 96, 97, 99, 99, 102, 103, 103, 103, 108, 109, 111, 111, 110, 111
Offset: 0

Views

Author

Antti Karttunen, Feb 22 2016

Keywords

Comments

Fibbinary numbers (A003714) give all integers n >= 0 for which a(n) = A003188(n) and also for which a(n) = A032766(n).

Crossrefs

Cf. A163617 (even bisection).
Cf. also A003188, A048735, A032766.

Programs

Formula

a(n) = A003986(n,(n-A000035(n))/2).
Other identities and observations. For all n >= 0:
a(2n) = A163617(n).
A003188(n) <= a(n) <= A032766(n).

A334076 a(n) = bitwise NOR of n and 2n.

Original entry on oeis.org

0, 0, 1, 0, 3, 0, 1, 0, 7, 4, 1, 0, 3, 0, 1, 0, 15, 12, 9, 8, 3, 0, 1, 0, 7, 4, 1, 0, 3, 0, 1, 0, 31, 28, 25, 24, 19, 16, 17, 16, 7, 4, 1, 0, 3, 0, 1, 0, 15, 12, 9, 8, 3, 0, 1, 0, 7, 4, 1, 0, 3, 0, 1, 0, 63, 60, 57, 56, 51, 48, 49, 48, 39, 36, 33, 32, 35, 32, 33
Offset: 0

Views

Author

Alois P. Heinz, Apr 13 2020

Keywords

Comments

Exactly all bits that are 0 in both parameters (but not a leading 0 of both) are set to 1 in the output of bitwise NOR.

Crossrefs

Programs

  • Maple
    a:= n-> Bits[Nor](n, 2*n):
    seq(a(n), n=0..127);
  • PARI
    a(n) = my(x=bitor(n, 2*n)); bitneg(x, #binary(x)); \\ Michel Marcus, Apr 14 2020
  • Python
    def A334076(n):
        m = n|(2*n)
        return 0 if n == 0 else 2**(len(bin(m))-2)-1-m # Chai Wah Wu, Apr 14 2020
    

Formula

a(n) = 0 <=> n in { A247648 } union { 0 }.
a(n) = n-1 <=> n in { A000079 }.
a(n) = n/2 <=> n in { A125835 }.
a(n) = n*3/4 <=> n in { A141032 }.
Previous Showing 11-15 of 15 results.