This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A057300 Binary counter with odd/even bit positions swapped; base 4 counter with 1's replaced by 2's and vice versa. 25
 0, 2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63, 128, 130, 129, 131, 136, 138 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS A self-inverse permutation of the integers. It is not true in general that a(2n) = -2a(n) + 5n, a(2n+1) = -2a(n) + 5n + 2 as was originally conjectured. Counterexamples: a(46) = 29; a(92) = 172; binary(172) = [1, 0, 1, 0, 1, 1, 0, 0], but binary(-2*29+5*92) = binary(402) = [1, 1, 0, 0, 1, 0, 0, 1, 0]. a(45) = 30; a(91) = 167; binary(167) = [1, 0, 1, 0, 0, 1, 1, 1], but -2*30+5*91+2=397 and binary(397) = [1, 1, 0, 0, 0, 1, 1, 0, 1]. - Lambert Herrgesell (zero815(AT)googlemail.com), Jan 13 2007 a(n) = n if and only if n can be written as 3*Sum[d_i*4^k, 0 <= k < infinity], where d_i is either 0 or 1. - Jon Perry, Oct 06 2012 From Veselin Jungic, Mar 03 2015: (Start) In 1988 A. F. Sidorenko, see the Sidorenko reference, used this sequence as an example of a permutation of the set of positive integers with the property that if positive integers i, j, and k form a 3-term arithmetic progression then the corresponding terms a(i), a(j), and a(k) do not form an arithmetic progression. In the terminology introduced in the Brown, Jungic, and Poelstra reference, the sequence does not contain "double 3-term arithmetic progressions". It is not difficult to check that this sequence is with unbounded gaps, i.e., for any positive number m there is a natural number n such that a(n+1)-a(n) > m. It is an open question if every sequence of integers with bounded gaps must contain a double 3-term arithmetic progression. This problem is equivalent to the well known additive square problem in infinite words: Is it true that any infinite word with a finite set of integers as its alphabet contains two consecutive blocks of the same length and the same sum? For more details about the additive square problem in infinite words see the following references: Ardal, et al.; Brown and Freedman; Freedman; Grytczuk; Halbeisen and Hungerbuhler, and Pirillo and Varricchio. The sequence was attributed to Sidorenko in P. Hegarty's paper "Permutations avoiding arithmetic patterns". In his paper Hegarty characterized the countably infinite abelian groups for which there exists a bijection mapping arithmetic progressions to non-arithmetic progressions. This was further generalized by Jungic and Sahasrabudhe. (End) LINKS Paul Tek, Table of n, a(n) for n = 0..16383 H. Ardal, T. Brown, V. Jungic, and J. Sahasrabudhe, On Additive and Abelian Complexity in Infinite Words, INTEGERS: Elect. J. Combin. Number Theory, 12 (2012), A21. T. C. Brown and A. R. Freedman, Arithmetic progressions in lacunary sets, Rocky Mountain J. Math., 17 Number 3 (1987), 587-596. doi:10.1216/RMJ-1987-17-3-587 T. Brown, V. Jungic, and A. Poelstra, On 3-term double arithmetic progressions, INTEGERS: Elect. J. Combin. Number Theory, 14 (2014), A43. A. R. Freedman, Sequences on sets of four numbers, INTEGERS: Elect. J. Combin. Number Theory, 16 (2016), A33. J. Grytczuk, Thue type problems for graphs, points and numbers, Discrete Math., 308 (2008), 4419-4429. L. Halbeisen and N. Hungerbuhler, An application of van der Waerden's theorem in additive number theory, INTEGERS: Elect. J. Combin. Number Theory, 0 (2000), A7. Peter Hegarty, Permutations avoiding arithmetic patterns, The Electronic Journal of Combinatorics, 11 (2004), #R39. V. Jungic and J. Sahasrabudhe, Permutations destroying arithmetic structure, The Electronic Journal of Combinatorics, Volume 22, Issue 2 (2015), Paper #P2.5. G. Pirillo and S. Varricchio, On uniformly repetitive semigroups, Semigroup Forum, 49 (1994), 125-129. A. F. Sidorenko, An infinite permutation without arithmetic progressions, Discrete Math., 69 (1988), 211. R. Stephan, Some divide-and-conquer sequences ... R. Stephan, Table of generating functions FORMULA a(4n+k) = 4a(n) + a(k), 0 <= k <= 3. - Jon Perry, Oct 06 2012 a(n) = A000695(A059906(n)) + 2*A000695(A059905(n)). - Antti Karttunen, Apr 14 2018 EXAMPLE a(31) = a(4*7+3) = 4*a(7) + a(3) = 4*11 + 3 = 47. MATHEMATICA Table[FromDigits[IntegerDigits[n, 4]/.{1->2, 2->1}, 4], {n, 0, 70}] (* Harvey P. Dale, Aug 24 2017 *) PROG (PARI) A057300(n) = { my(t=1, s=0); while(n>0, if(1==(n%4), n++, if(2==(n%4), n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); }; \\ Antti Karttunen, Apr 14 2018 CROSSREFS Cf. A000695, A057301, A059905, A059906, A126006, A126007, A126008, A163241. Cf. also A163327. Sequence in context: A202624 A145490 A302544 * A076655 A236438 A101486 Adjacent sequences:  A057297 A057298 A057299 * A057301 A057302 A057303 KEYWORD easy,nonn,base AUTHOR Marc LeBrun, Aug 24 2000 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 14 12:36 EST 2018. Contains 317185 sequences. (Running on oeis4.)