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.

A163235 Two-dimensional Binary Reflected Gray Code, transposed version: a(i,j) = bits of binary expansion of A003188(j) interleaved with that of A003188(i).

This page as a plain text file.
%I A163235 #24 Jul 03 2025 20:40:06
%S A163235 0,2,1,10,3,5,8,11,7,4,40,9,15,6,20,42,41,13,14,22,21,34,43,45,12,30,
%T A163235 23,17,32,35,47,44,28,31,19,16,160,33,39,46,60,29,27,18,80,162,161,37,
%U A163235 38,62,61,25,26,82,81,170,163,165,36,54,63,57,24,90,83,85,168,171,167
%N A163235 Two-dimensional Binary Reflected Gray Code, transposed version: a(i,j) = bits of binary expansion of A003188(j) interleaved with that of A003188(i).
%C A163235 The top left 8x8 corner of this array
%C A163235 +0 +2 10 +8 40 42 34 32
%C A163235 +1 +3 11 +9 41 43 35 33
%C A163235 +5 +7 15 13 45 47 39 37
%C A163235 +4 +6 14 12 44 46 38 36
%C A163235 20 22 30 28 60 62 54 52
%C A163235 21 23 31 29 61 63 55 53
%C A163235 17 19 27 25 57 59 51 49
%C A163235 16 18 26 24 56 58 50 48
%C A163235 corresponds with Adamson's "H-bond codon-anticodon magic square" (see page 287 in Pickover's book):
%C A163235 CCC CCU CUU CUC UUC UUU UCU UCC
%C A163235 CCA CCG CUG CUA UUA UUG UCG UCA
%C A163235 CAA CAG CGG CGA UGA UGG UAG UAA
%C A163235 CAC CAU CGU CGC UGC UGU UAU UAC
%C A163235 AAC AAU AGU AGC GGC GGU GAU GAC
%C A163235 AAA AAG AGG AGA GGA GGG GAG GAA
%C A163235 ACA ACG AUG AUA GUA GUG GCG GCA
%C A163235 ACC ACU AUU AUC GUC GUU GCU GCC
%C A163235 when the base-triples are interpreted as quaternary (base-4) numbers, with the following rules: C = 0, A = 1, U = 2, G = 3.
%D A163235 Clifford A. Pickover, The Zen of Magic Squares, Circles, and Stars: An Exhibition of Surprising Structures across Dimensions, Princeton University Press, 2002, pp. 285-289.
%H A163235 Antti Karttunen, <a href="/A163235/b163235.txt">Table of n, a(n) for n = 0..2079</a>
%H A163235 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%t A163235 Table[Function[k, FromDigits[#, 2] &@Apply[Function[{a, b}, Riffle @@ Map[PadLeft[#, Max[Length /@ {a, b}]] &, {a, b}]], Map[IntegerDigits[#, 2] &@ BitXor[#, Floor[#/2]] &, {k, j}]]][i - j], {i, 0, 11}, {j, 0, i}] // Flatten (* _Michael De Vlieger_, Jun 25 2017 *)
%o A163235 (Scheme) (define (A163235 n) (A163233bi (A002262 n) (A025581 n)))
%o A163235 (Python)
%o A163235 def a000695(n):
%o A163235     n=bin(n)[2:]
%o A163235     x=len(n)
%o A163235     return sum(int(n[i])*4**(x - 1 - i) for i in range(x))
%o A163235 def a003188(n): return n^(n>>1)
%o A163235 def a(n, k): return a000695(a003188(n)) + 2*a000695(a003188(k))
%o A163235 for n in range(21): print([a(k, n - k) for k in range(n + 1)]) # _Indranil Ghosh_, Jun 25 2017
%Y A163235 Inverse: A163236. a(n) = A057300(A163233(n)). Transpose: A163233. Row sums: A163242. Cf. A054238, A147995.
%K A163235 nonn,tabl
%O A163235 0,2
%A A163235 _Antti Karttunen_, Jul 29 2009