The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 7

%I #20 Apr 11 2021 04:08:04

%S 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 23,17,32,35,47,44,28,31,19,16,160,33,39,46,60,29,27,18,80,162,161,37,

%U 38,62,61,25,26,82,81,170,163,165,36,54,63,57,24,90,83,85,168,171,167

%N 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 The top left 8x8 corner of this array

%C +0 +2 10 +8 40 42 34 32

%C +1 +3 11 +9 41 43 35 33

%C +5 +7 15 13 45 47 39 37

%C +4 +6 14 12 44 46 38 36

%C 20 22 30 28 60 62 54 52

%C 21 23 31 29 61 63 55 53

%C 17 19 27 25 57 59 51 49

%C 16 18 26 24 56 58 50 48

%C corresponds with Adamson's "H-bond codon-anticodon magic square" (see page 287 in Pickover's book):

%C CCC CCU CUU CUC UUC UUU UCU UCC

%C CCA CCG CUG CUA UUA UUG UCG UCA

%C CAA CAG CGG CGA UGA UGG UAG UAA

%C CAC CAU CGU CGC UGC UGU UAU UAC

%C AAC AAU AGU AGC GGC GGU GAU GAC

%C AAA AAG AGG AGA GGA GGG GAG GAA

%C ACA ACG AUG AUA GUA GUG GCG GCA

%C ACC ACU AUU AUC GUC GUU GCU GCC

%C when the base-triples are interpreted as quaternary (base-4) numbers, with the following rules: C = 0, A = 1, U = 2, G = 3.

%D 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 A. Karttunen, <a href="/A163235/b163235.txt">Table of n, a(n) for n = 0..2079</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%t 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 (Scheme:) (define (A163235 n) (A163233bi (A002262 n) (A025581 n)))

%o (Python)

%o def a000695(n):

%o n=bin(n)[2:]

%o x=len(n)

%o return sum(int(n[i])*4**(x - 1 - i) for i in range(x))

%o def a003188(n): return n^(n>>1)

%o def a(n, k): return a000695(a003188(n)) + 2*a000695(a003188(k))

%o for n in range(21): print([a(k, n - k) for k in range(n + 1)]) # _Indranil Ghosh_, Jun 25 2017

%Y Inverse: A163236. a(n) = A057300(A163233(n)). Transpose: A163233. Row sums: A163242. Cf. A054238, A147995.

%K nonn,tabl

%O 0,2

%A _Antti Karttunen_, Jul 29 2009

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 1 08:04 EDT 2024. Contains 373013 sequences. (Running on oeis4.)