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

A294899 a(n) = A000203(n) XOR A005187(n), where XOR is bitwise-XOR, A003987.

Original entry on oeis.org

0, 0, 0, 0, 14, 6, 3, 0, 29, 0, 31, 10, 25, 1, 2, 0, 50, 5, 55, 12, 7, 13, 50, 18, 48, 27, 26, 13, 40, 112, 25, 0, 112, 116, 115, 29, 97, 117, 114, 20, 101, 49, 126, 1, 24, 16, 105, 34, 102, 60, 42, 7, 80, 16, 33, 21, 62, 42, 77, 220, 75, 23, 16, 0, 212, 18, 199, 248, 231, 25, 194, 77, 197, 227, 238, 25, 246, 48, 201, 36
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2017

Keywords

Crossrefs

Cf. A000203, A003987, A005187, A294898, A295296 (positions of zeros), A295297 (parity of a(n)).
Cf. also A169813, A279357, A283997.

Programs

Formula

a(n) = A000203(n) XOR A005187(n).

A280700 Binary weight of terms of A005187: a(n) = A000120(A005187(n)).

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 2, 3, 4, 1, 2, 3, 3, 4, 3, 3, 5, 1, 2, 3, 3, 4, 3, 3, 4, 5, 3, 3, 4, 4, 3, 4, 6, 1, 2, 3, 3, 4, 3, 3, 4, 5, 3, 3, 4, 4, 3, 4, 5, 6, 3, 3, 4, 4, 3, 4, 5, 5, 3, 4, 4, 5, 6, 4, 7, 1, 2, 3, 3, 4, 3, 3, 4, 5, 3, 3, 4, 4, 3, 4, 5, 6, 3, 3, 4, 4, 3, 4, 5, 5, 3, 4, 4, 5, 6, 4, 6, 7, 3, 3, 4, 4, 3, 4, 5, 5, 3, 4, 4, 5, 6, 4, 6, 6, 3, 4, 4, 5, 6, 4, 5
Offset: 0

Views

Author

Antti Karttunen, Mar 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DigitCount[2 n - DigitCount[2 n, 2, 1], 2, 1], {n, 0, 120}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    b(n) = if(n<1, 0, b(n\2) + n%2);
    for(n=0, 150, print1(b(2*n - b(2*n)), ", ")) \\ Indranil Ghosh, Mar 21 2017
    
  • Python
    def A(n): return bin(2*n - bin(2*n)[2:].count("1"))[2:].count("1")
    print([A(n) for n in range(151)]) # Indranil Ghosh, Mar 21 2017
  • Scheme
    (define (A280700 n) (A000120 (A005187 n)))
    

Formula

a(n) = A000120(A005187(n)).
a(n) = A001221(A283475(n)) = A001222(A283475(n)) = A001222(A280705(n)).

A283997 a(n) = n XOR A005187(floor(n/2)), where XOR is bitwise-xor (A003987).

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 2, 3, 15, 14, 2, 3, 6, 7, 5, 4, 31, 30, 2, 3, 6, 7, 5, 4, 14, 15, 13, 12, 5, 4, 4, 5, 63, 62, 2, 3, 6, 7, 5, 4, 14, 15, 13, 12, 5, 4, 4, 5, 30, 31, 29, 28, 5, 4, 4, 5, 13, 12, 12, 13, 4, 5, 7, 6, 127, 126, 2, 3, 6, 7, 5, 4, 14, 15, 13, 12, 5, 4, 4, 5, 30, 31, 29, 28, 5, 4, 4, 5, 13, 12, 12, 13, 4, 5, 7, 6, 62, 63, 61, 60, 5, 4, 4, 5, 13, 12, 12
Offset: 0

Views

Author

Antti Karttunen, Mar 19 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[BitXor[n, 2 # - DigitCount[2 #, 2, 1] &@ Floor[n/2]], {n, 0, 106}] (* Michael De Vlieger, Mar 20 2017 *)
  • PARI
    b(n) = if(n<1, 0, b(n\2) + n%2);
    A(n) = 2*n - b(2*n);
    for(n=0, 110, print1(bitxor(n, A(floor(n/2))),", ")) \\ Indranil Ghosh, Mar 25 2017
    
  • Python
    def A(n): return 2*n - bin(2*n)[2:].count("1")
    print([n^A(n//2) for n in range(111)]) # Indranil Ghosh, Mar 25 2017
  • Scheme
    (define (A283997 n) (A003987bi n (A005187 (floor->exact (/ n 2))))) ;; Where A003987bi implements bitwise-XOR (A003987).
    

Formula

a(n) = n XOR A005187(floor(n/2)), where XOR is bitwise-xor (A003987).
a(n) = A283996(n) - A283998(n).
a(n) = A005187(n) - 2*A283998(n).
a(n) = A006068(n) XOR A283999(floor(n/2)).

A279353 a(n) = A055938(n+1) XOR A055938(n).

Original entry on oeis.org

7, 3, 15, 5, 1, 3, 31, 5, 1, 13, 3, 7, 1, 3, 63, 5, 1, 13, 3, 7, 1, 29, 3, 7, 3, 13, 1, 7, 1, 3, 127, 5, 1, 13, 3, 7, 1, 29, 3, 7, 3, 13, 1, 7, 1, 61, 3, 7, 3, 13, 1, 7, 3, 29, 1, 5, 15, 3, 1, 7, 1, 3, 255, 5, 1, 13, 3, 7, 1, 29, 3, 7, 3, 13, 1, 7, 1, 61, 3, 7, 3, 13, 1, 7, 3, 29, 1, 5, 15, 3, 1, 7, 1, 125, 3, 7, 3, 13, 1, 7, 3, 29, 1, 5, 15
Offset: 1

Views

Author

Antti Karttunen, Mar 15 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A055938(n+1) XOR A055938(n).
Showing 1-4 of 4 results.