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

A048719 Binary expansion matches ((0)*0011)*(0*).

Original entry on oeis.org

0, 3, 6, 12, 24, 48, 51, 96, 99, 102, 192, 195, 198, 204, 384, 387, 390, 396, 408, 768, 771, 774, 780, 792, 816, 819, 1536, 1539, 1542, 1548, 1560, 1584, 1587, 1632, 1635, 1638, 3072, 3075, 3078, 3084, 3096
Offset: 0

Views

Author

Antti Karttunen, Mar 30 1999

Keywords

Comments

1-bits occur only in pairs, separated from other such pairs by at least two 0-bits.
All terms satisfy both A048727(n) = 3*n and A048725(n) = 5*n.

Crossrefs

Intersection of A048716 and A048717.

Programs

  • Mathematica
    filterQ[n_] := With[{bb = IntegerDigits[n, 2]}, !MatchQ[bb, {1}|{1, 0, _}|{_, 0, 1}|{_, 0, 1, 0, _}|{_, 1, 1, 1, _}|{_, 1, 0, 1, _}]];
    Select[Range[0, 3096], filterQ] (* Jean-François Alcover, Dec 31 2020 *)
  • PARI
    is(n)=n%3==0 && !bitand(n/3, 14*n/3) \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(n) = 3*A048718(n).

A178731 a(n) = n XOR 5n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 4, 8, 12, 16, 28, 24, 36, 32, 36, 56, 60, 48, 76, 72, 68, 64, 68, 72, 76, 112, 124, 120, 100, 96, 100, 152, 156, 144, 140, 136, 132, 128, 132, 136, 140, 144, 156, 152, 228, 224, 228, 248, 252, 240, 204, 200, 196, 192, 196, 200, 204, 304, 316, 312, 292, 288, 292
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010

A178734 a(n) = n XOR 8n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 9, 18, 27, 36, 45, 54, 63, 72, 65, 90, 83, 108, 101, 126, 119, 144, 153, 130, 139, 180, 189, 166, 175, 216, 209, 202, 195, 252, 245, 238, 231, 288, 297, 306, 315, 260, 269, 278, 287, 360, 353, 378, 371, 332, 325, 350, 343, 432, 441, 418, 427, 404, 413, 390
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010

A178732 a(n) = n XOR 6n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 7, 14, 17, 28, 27, 34, 45, 56, 63, 54, 73, 68, 67, 90, 85, 112, 119, 126, 97, 108, 107, 146, 157, 136, 143, 134, 185, 180, 179, 170, 165, 224, 231, 238, 241, 252, 251, 194, 205, 216, 223, 214, 297, 292, 291, 314, 309, 272, 279, 286, 257, 268, 267, 370, 381
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := BitXor[n, 6 n]; Array[f, 60, 0] (* Robert G. Wilson v, Jun 09 2010 *)

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010

A178733 a(n) = n XOR 7n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 6, 12, 22, 24, 38, 44, 54, 48, 54, 76, 70, 88, 86, 108, 102, 96, 102, 108, 150, 152, 134, 140, 182, 176, 182, 172, 166, 216, 214, 204, 198, 192, 198, 204, 214, 216, 294, 300, 310, 304, 310, 268, 262, 280, 278, 364, 358, 352, 358, 364, 342, 344, 326, 332, 438
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := BitXor[n, 7 n]; Array[f, 60, 0] (* Robert G. Wilson v, Jun 09 2010 *)

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010

A178735 a(n) = n XOR 9n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 8, 16, 24, 32, 40, 48, 56, 64, 88, 80, 104, 96, 120, 112, 136, 128, 136, 176, 184, 160, 168, 208, 216, 192, 248, 240, 232, 224, 280, 272, 264, 256, 264, 272, 280, 352, 360, 368, 376, 320, 344, 336, 424, 416, 440, 432, 392, 384, 392, 496, 504, 480, 488, 464
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := BitXor[n, 9 n]; Array[f, 60, 0] (* Robert G. Wilson v, Jun 09 2010 *)

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010

A178736 a(n) = n XOR 10n, where XOR is bitwise XOR.

Original entry on oeis.org

0, 11, 22, 29, 44, 55, 58, 65, 88, 83, 110, 101, 116, 143, 130, 153, 176, 187, 166, 173, 220, 199, 202, 241, 232, 227, 286, 277, 260, 319, 306, 297, 352, 363, 374, 381, 332, 343, 346, 417, 440, 435, 398, 389, 404, 495, 482, 505, 464, 475, 454, 461, 572, 551
Offset: 0

Views

Author

Dmitry Kamenetsky, Jun 08 2010

Keywords

Crossrefs

Programs

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

Extensions

a(30) onwards from Robert G. Wilson v, Jun 09 2010

A269173 Formula for Wolfram's Rule 126 cellular automaton: a(n) = (n XOR 2n) OR (n XOR 4n).

Original entry on oeis.org

0, 7, 14, 15, 28, 31, 30, 27, 56, 63, 62, 63, 60, 63, 54, 51, 112, 119, 126, 127, 124, 127, 126, 123, 120, 127, 126, 127, 108, 111, 102, 99, 224, 231, 238, 239, 252, 255, 254, 251, 248, 255, 254, 255, 252, 255, 246, 243, 240, 247, 254, 255, 252, 255, 254, 251, 216, 223, 222, 223, 204, 207, 198, 195, 448, 455, 462
Offset: 0

Views

Author

Antti Karttunen, Feb 22 2016

Keywords

Examples

			a(4) = (4 XOR 2*4) OR (4 XOR 4*4) = 12 OR 20 = 28. - _Indranil Ghosh_, Apr 02 2017
		

Crossrefs

Cf. A267365 (iterates starting from 1).
Cf. A269174.

Programs

  • C
    #include 
    int main()
    {
        int n;
        for(n=0; n<=100; n++){
            printf("%d, ",(n^(2*n))|(n^(4*n)));
        }
        return 0;
    } /* Indranil Ghosh, Apr 02 2017 */
  • Mathematica
    Table[BitOr[BitXor[n, 2n], BitXor[n, 4n]], {n, 0, 100}] (* Indranil Ghosh, Apr 02 2017 *)
  • PARI
    for(n=0, 100, print1(bitor(bitxor(n, 2*n), bitxor(n, 4*n)),", ")) \\ Indranil Ghosh, Apr 02 2017
    
  • Python
    print([(n^(2*n))|(n^(4*n)) for n in range(101)]) # Indranil Ghosh, Apr 02 2017
    
  • Scheme
    (define (A269173 n) (A003986bi (A048724 n) (A048725 n)))
    

Formula

a(n) = A048724(n) OR A048725(n) = (n XOR 2n) OR (n XOR 4n), where OR is a bitwise-or (A003986) and XOR is A003987.
Other identities. For all n >= 0:
a(2*n) = 2*a(n).
a(n) = A057889(a(A057889(n))). [Rule 126 is amphichiral (symmetric).]

A353167 Polynomials over GF(2) that are divisible by (x+1)^2 = x^2+1, encoded as binary numbers.

Original entry on oeis.org

0, 5, 10, 15, 17, 20, 27, 30, 34, 39, 40, 45, 51, 54, 57, 60, 65, 68, 75, 78, 80, 85, 90, 95, 99, 102, 105, 108, 114, 119, 120, 125, 130, 135, 136, 141, 147, 150, 153, 156, 160, 165, 170, 175, 177, 180, 187, 190, 195, 198, 201, 204, 210, 215, 216, 221, 225, 228, 235
Offset: 1

Views

Author

Jack Zhang, Apr 28 2022

Keywords

Comments

Terms of A048725, sorted.
See also A001969 for those divisible by x+1 (and obviously the present sequence is a subsequence of that one).
From Kevin Ryde, Jul 22 2022: (Start)
Integers with an even number of 1-bits at even positions, and an even number of 1-bits at odd positions, and so all k with A355487(k) = 0.
Among four integers 4*i ..4*i+3, exactly one is a term here so that a(n) can be calculated by appending two bits to n-1 to ensure the two 1-bit counts are even, so a(n) = 4*(n-1) + A355487(n-1).
(End)

Crossrefs

Cf. A355487 (mod 4), A341389 (mod 2).

Programs

  • PARI
    a(n) = n--; n<<2 + if(n,fold(bitxor,digits(n,4))); \\ Kevin Ryde, Jul 01 2022

Extensions

More terms from David A. Corneth, Apr 28 2022

A309709 Number of binary digits that change when n is multiplied by 4.

Original entry on oeis.org

0, 2, 2, 4, 2, 2, 4, 4, 2, 4, 2, 4, 4, 4, 4, 4, 2, 4, 4, 6, 2, 2, 4, 4, 4, 6, 4, 6, 4, 4, 4, 4, 2, 4, 4, 6, 4, 4, 6, 6, 2, 4, 2, 4, 4, 4, 4, 4, 4, 6, 6, 8, 4, 4, 6, 6, 4, 6, 4, 6, 4, 4, 4, 4, 2, 4, 4, 6, 4, 4, 6, 6, 4, 6, 4, 6, 6, 6, 6, 6, 2, 4, 4, 6, 2, 2, 4, 4
Offset: 0

Views

Author

Ali Sada, Aug 14 2019

Keywords

Comments

All terms are even.

Examples

			00101_2 * 100_2 = 10100_2: 2 bits changed, so a(5) = 2.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(i, i=Bits[Split](Bits[Xor](n*4,n))):
    seq(a(n), n=0..120);  # Alois P. Heinz, Aug 23 2019
  • Mathematica
    a[n_] := Total@ IntegerDigits[BitXor[n, 4 n], 2]; Array[a, 88, 0] (* Giovanni Resta, Sep 19 2019 *)
  • PARI
    A309709(n) = hammingweight(bitxor(n, n<<2)); \\ Antti Karttunen, Aug 22 2019
    
  • Python
    def A309709(n):
        s = ""
        while n > 0:
            s, n = str(n%2)+s,n//2
        s, s4, i, j = "00"+s, s+"00", 0, 0
        while i < len(s):
            if s[i] != s4[i]:
                j = j+1
            i = i+1
        return j # A.H.M. Smeets, Aug 23 2019

Formula

a(n) = A000120(A048725(n)). - Antti Karttunen, Aug 22 2019
a(A112627(n)) = 2*n and A112627(n) is the first position where 2*n occurs in this sequence. - David A. Corneth, Sep 19 2019
Previous Showing 11-20 of 20 results.