A293207 Lexicographically earliest sequence of positive terms such that the function f defined by f(n) = Sum_{k=1..n} (i^k * a(k)) for any n >= 0 is injective (where i denotes the imaginary unit), and a(n) != a(n+1) and a(n) != a(n+2) for any n > 0.
1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 4, 1, 2, 4, 1, 2, 3, 1, 4, 5, 1, 7, 2, 1, 4, 2, 1, 4, 5, 1, 2, 3, 1, 2, 6, 3, 1, 4, 2, 1, 9, 2, 1, 3, 2, 1, 11, 2, 1, 6, 2, 1, 3, 2, 1, 6, 4, 7, 1, 3, 2, 1, 3, 9, 1, 2, 3, 1, 4, 7, 5, 1, 2, 4, 1, 11, 4, 10, 1, 9, 2, 6, 7, 1, 9
Offset: 1
Keywords
Examples
f(0) = 0 i^1 = i. f(0) + 1*i has not yet been visited; hence a(1) = 1 and f(1) = i. i^2 = -1. f(1) + 1*-1 has not yet been visited, but a(1) = 1. f(1) + 2*-1 has not yet been visited; hence a(2) = 2 and f(2) = -2 + i. i^3 = -i. f(2) + 1*-i has not yet been visited, but a(1) = 1. f(2) + 2*-i has not yet been visited, but a(2) = 2. f(2) + 3*-i has not yet been visited; hence a(3) = 3 and f(3) = -2 - 2*i. i^4 = 1. f(3) + 1*1 has not yet been visited; hence a(4) = 1 and f(4) = -1 - 2*i. i^5 = i. f(4) + 1*i has not yet been visited, but a(4) = 1. f(4) + 2*i has not yet been visited; hence a(5) = 2 and f(5) = -1. i^6 = -1. f(5) + 1*-1 has not yet been visited, but a(4) = 1. f(5) + 2*-1 has not yet been visited, but a(5) = 2. f(5) + 3*-1 has not yet been visited; hence a(6) = 3 and f(6) = -4. i^7 = -i. f(6) + 1*-i has not yet been visited; hence a(7) = 1 and f(7) = -4 - i. i^8 = 1. f(7) + 1*1 has not yet been visited, but a(7) = 1. f(7) + 2*1 has not yet been visited; hence a(8) = 2 and f(8) = -2 - i. i^9 = i. f(8) + 1*i has not yet been visited, but a(7) = 1. f(8) + 2*i has not yet been visited, but a(8) = 2. f(8) + 3*i has not yet been visited; hence a(9) = 3 and f(9) = -2 + 2*i. i^10 = -1. f(9) + 1*-1 has not yet been visited; hence a(10) = 1 and f(10) = -3 + 2*i.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..60000
- Rémy Sigrist, Representation of f(n) for n=0..60000
- Rémy Sigrist, Representation of f_8(n) for n=0..121346
- Rémy Sigrist, Representation of f_12(n) for n=0..4463502
- Rémy Sigrist, Representation of f_6(n) for n=0..10000000
- Rémy Sigrist, PARI program for A293207
- Wikipedia, Langton's ant
Programs
-
PARI
See Links section.
Formula
a(56948 + 8*k + i) = (1-k) * a(56948 + i) + k * a(56948 + i + 8) for any k >= 0 and i in 0..7.
Comments