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.

A116625 a(n) = A116624(n) XOR A116624(n+1).

Original entry on oeis.org

3, 6, 12, 13, 15, 26, 23, 14, 24, 49, 43, 25, 51, 50, 48, 55, 54, 52, 62, 61, 60, 53, 56, 63, 91, 93, 59, 57, 58, 100, 95, 92, 101, 99, 110, 105, 111, 106, 107, 104, 197, 174, 102, 103, 98, 204, 198, 196, 202, 203, 200, 206, 207, 205, 201, 199, 216, 213, 212
Offset: 1

Views

Author

Paul D. Hanna and Antti Karttunen, Feb 21 2006

Keywords

Comments

XOR is A003987.

Crossrefs

Bisection of A116626. Complement of A116624?.
Cf. A235262.

A116628 Positions where A116624 is a power of 2.

Original entry on oeis.org

1, 2, 3, 4, 7, 11, 26, 42, 109, 166, 373, 772, 1532, 2930, 6154, 10933, 24184, 44069, 105575, 155528, 374727, 681122, 1630332, 3077586, 6523332
Offset: 1

Views

Author

Paul D. Hanna and Antti Karttunen, Feb 21 2006

Keywords

Comments

Conjecture: all the powers of 2 occur in A116624 (implying that none occur in A116625) and they occur in ascending order, in which case A116624(a(n)) = A000079(n-1). Checked up to n=16.

Crossrefs

Programs

  • C
    See Links section.

Extensions

a(17)-a(25) from Rémy Sigrist, Feb 14 2023

A116626 a(1)=1; a(odd n) = a(n-1) XOR a(n-2), for a(even n) we find the first i > 1 such that neither i nor (i XOR A116626(n-1)) is present in A116626(1..n-1), in which case a(n) = (i XOR A116626(n-1)).

Original entry on oeis.org

1, 3, 2, 6, 4, 12, 8, 13, 5, 15, 10, 26, 16, 23, 7, 14, 9, 24, 17, 49, 32, 43, 11, 25, 18, 51, 33, 50, 19, 48, 35, 55, 20, 54, 34, 52, 22, 62, 40, 61, 21, 60, 41, 53, 28, 56, 36, 63, 27, 91, 64, 93, 29, 59, 38, 57, 31, 58, 37, 100, 65, 95, 30, 92, 66, 101, 39, 99, 68, 110, 42
Offset: 1

Views

Author

Paul D. Hanna and Antti Karttunen, Feb 21 2006

Keywords

Comments

This is a permutation of the natural numbers provided that A116625 is the complement of A116624. XOR is A003987.

Crossrefs

Cf. a(2n) = a(2n-1) XOR a(2n+1), a(2n+1) = A116624(n+1). Inverse: A116627. Bisections: A116624, A116625. Cf. A116648.

A360706 a(n) is the least positive number not yet used such that its binary representation has either all or none of its 1-bits in common with the XOR of a(1) to a(n-1).

Original entry on oeis.org

1, 2, 3, 4, 8, 12, 5, 10, 6, 9, 7, 16, 17, 24, 14, 11, 18, 20, 13, 15, 19, 32, 36, 21, 25, 26, 22, 23, 27, 33, 37, 28, 34, 30, 29, 40, 42, 31, 64, 96, 35, 68, 38, 44, 41, 43, 39, 48, 56, 45, 65, 66, 46, 47, 67, 80, 52, 49, 57, 50, 82, 69, 97, 51, 53, 60, 54, 55, 58, 72, 73, 59, 61, 76, 70, 71, 74
Offset: 1

Views

Author

Thomas Scheuerle, Feb 17 2023

Keywords

Comments

The lexicographically earliest permutation of positive numbers such that the nim-sum of the first k elements equals the nim-sum of k-1 elements with the element at position k either arithmetically added or subtracted.
The first occurrence of a number m >= 2^k is always m = 2^k.
All positive integers will appear in this sequence: see link section for details.

Examples

			   n    a(n)  a(n) in binary   a(1) XOR ... XOR a(n-1) in binary
------------------------------------------------------------------
   1     1          1b             0b
   2     2         10b             1b
   3     3         11b            11b
   4     4        100b             0b
   5     8       1000b           100b
   6    12       1100b          1100b
   7     5        101b             0b
...
Signed version of this sequence such that the arithmetic sum over the first k values equals the nim-sum over the first k values of the original sequence:
1, 2, -3, 4, 8, -12, 5, 10, -6, -9, 7, 16, -17, 24, -14, 11, -18, 20, -13, ...
		

Crossrefs

Programs

  • MATLAB
    function a = A360706( max_n )
        s = 0; a = []; t = [1:max_n];
        for n = 1:max_n
            k = 1;
            while (t(k) ~= bitand(s,t(k)))&&(0 ~= bitand(s,t(k)))
                k = k+1;
            end
            s = bitxor(s,t(k));
            a(n) = t(k);
            t(k) = max(t)+1; t = sort(t);
        end
    end
    
  • PARI
    { m = s = 0; for (n = 1, 77, for (v = 1, oo, if (!bittest(s, v), x = bitand(m, v); if (x==0 || x==v, s += 2^v; m = bitxor(m, v); print1 (v", "); break;);););); } \\ Rémy Sigrist, Aug 31 2024

Formula

If a(m1) = 2^k and a(m2) = 2^k-1 then m1 - 2^k < 0 and m2 - (2^k-1) > 0 for k > 2.
Showing 1-4 of 4 results.