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

A235263 a(n) = A235262(n) XOR A235262(n+1), where XOR stands for the binary XOR operator.

Original entry on oeis.org

3, 1, 7, 2, 14, 13, 12, 5, 11, 10, 6, 4, 31, 26, 27, 9, 22, 28, 8, 15, 53, 51, 50, 55, 52, 54, 48, 61, 58, 56, 62, 57, 59, 23, 39, 49, 20, 47, 44, 46, 43, 42, 45, 25, 29, 30, 17, 16, 18, 21, 19, 124, 107, 106, 109, 110, 111, 24, 118, 117, 114, 125, 127, 104
Offset: 1

Views

Author

Paul Tek, Jan 05 2014

Keywords

Comments

All terms are distinct.

Crossrefs

Programs

  • Perl
    See Link section.

A257218 Lexicographically earliest sequence of distinct positive integers such that gcd(a(n), a(n-1)) takes no value more than twice.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 10, 5, 15, 9, 18, 12, 16, 24, 30, 20, 40, 32, 48, 36, 27, 54, 72, 60, 45, 75, 25, 50, 70, 7, 14, 28, 42, 21, 63, 126, 84, 56, 112, 64, 96, 120, 80, 100, 150, 90, 108, 81, 162, 216, 144, 168, 140, 35, 105, 210, 180, 135, 225, 300
Offset: 1

Views

Author

Ivan Neretin, Apr 18 2015

Keywords

Comments

Presumably a(n) is a permutation of the positive integers.
Primes seem to occur in their natural order. 31 appears as a(7060). Primes p >= 37 are not found among the first 10000 terms.
Numbers n such that a(n)=n are 1, 2, 3, 12, 306, ...
A256918(n) = gcd(a(n), a(n+1)); gcd(a(A257120(n)), a(A257120(n)+1)) = gcd(a(A257475(n)), a(A257475(n)-1)) = n. - Reinhard Zumkeller, Apr 25 2015
For p prime: A257122(p)-1 = index of the smallest multiple of p: a(A257122(p)-1) mod p = 0 and a(m) mod p > 0 for m < A257122(p)-1. - Reinhard Zumkeller, Apr 26 2015

Examples

			After a(9)=15, the values 1, 2, 3, 4, 6, and 8 are already used, while 7 is forbidden because gcd(15,7)=1 and that value of GCD has already occurred twice, at (1,2) and (2,3). The minimal value which is neither used not forbidden is 9, so a(10)=9.
		

Crossrefs

Other minimal sequences of distinct positive integers that match some condition imposed on a(n) and a(n-1):
A175498 (differences are unique),
A081145 (absolute differences are unique),
A235262 (bitwise XORs are unique),
A163252 (differ by one bit in binary),
A000027 (GCD=1),
A064413 (GCD>1),
A128280 (sum is a prime),
A034175 (sum is a square),
A175428 (sum is a cube),
A077220 (sum is a triangular number),
A073666 (product plus 1 is a prime),
A081943 (product minus 1 is a prime),
A091569 (product plus 1 is a square),
A100208 (sum of squares is a prime).
Cf. A004526.
Cf. A256918, A257120, A257475, A257478, A257122 (putative inverse).
Cf. also A281978.

Programs

  • Haskell
    import Data.List (delete); import Data.List.Ordered (member)
    a257218 n = a257218_list !! (n-1)
    a257218_list = 1 : f 1 [2..] a004526_list where
       f x zs cds = g zs where
         g (y:ys) | cd `member` cds = y : f y (delete y zs) (delete cd cds)
                  | otherwise       = g ys
                  where cd = gcd x y
    -- Reinhard Zumkeller, Apr 24 2015
  • Mathematica
    a={1}; used=Array[0&,10000]; Do[i=1; While[MemberQ[a,i] || used[[l=GCD[a[[-1]],i]]]>=2, i++]; used[[l]]++; AppendTo[a,i], {n,2,100}]; a (* Ivan Neretin, Apr 18 2015 *)

A116624 a(1)=1; for n>1, a(n) = least positive integer not appearing earlier such that {a(k) | 1 <= k <= n} and {a(k) XOR a(k-1) | 1 <= k <= n} are disjoint sets of distinct numbers.

Original entry on oeis.org

1, 2, 4, 8, 5, 10, 16, 7, 9, 17, 32, 11, 18, 33, 19, 35, 20, 34, 22, 40, 21, 41, 28, 36, 27, 64, 29, 38, 31, 37, 65, 30, 66, 39, 68, 42, 67, 44, 70, 45, 69, 128, 46, 72, 47, 77, 129, 71, 131, 73, 130, 74, 132, 75, 134, 79, 136, 80, 133, 81, 135, 84, 137, 82, 139, 85
Offset: 1

Views

Author

Paul D. Hanna and Antti Karttunen, Feb 21 2006

Keywords

Comments

Another way to define this: A116624(1) = 1; A116624(n) = the least positive integer i distinct from any of A116624(1..n-1) and A116625(1..n-2), such that also (i XOR A116624(n-1)) is not present in A116625(1..n-2) nor in A116624(1..n-1).

Crossrefs

Cf. Bisection of A116626. Complement of A116625?

Programs

  • Mathematica
    a = {1}; used = {}; Do[k = 1; While[MemberQ[Join[a, used], k] || MemberQ[Join[a, used], r = BitXor[a[[-1]], k]], k++]; AppendTo[a, k]; AppendTo[used, r], {n, 2, 66}]; a (* Ivan Neretin, Mar 13 2017 *)

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.

A269868 Lexicographically earliest sequence of distinct positive integers such that all values of (a(n) XOR n) are distinct.

Original entry on oeis.org

1, 3, 4, 2, 6, 8, 5, 7, 12, 14, 16, 17, 18, 20, 19, 9, 15, 10, 24, 25, 28, 26, 29, 11, 13, 32, 34, 33, 21, 37, 35, 22, 30, 23, 27, 49, 50, 48, 53, 31, 56, 58, 64, 65, 66, 68, 67, 69, 70, 72, 71, 73, 74, 77, 75, 78, 80, 82, 85, 76, 79, 88, 90, 36, 38, 51, 59, 39, 54, 63, 57, 40
Offset: 1

Views

Author

Ivan Neretin, Mar 06 2016

Keywords

Crossrefs

Programs

  • Mathematica
    a = used = {}; Do[k = 1; While[MemberQ[a, k] || MemberQ[used, x = BitXor[k, n]], k++]; AppendTo[a, k]; AppendTo[used, x], {n, 72}]; a
Showing 1-5 of 5 results.