OFFSET
0,2
COMMENTS
The top left 8x8 corner of this array
+0 +2 10 +8 40 42 34 32
+1 +3 11 +9 41 43 35 33
+5 +7 15 13 45 47 39 37
+4 +6 14 12 44 46 38 36
20 22 30 28 60 62 54 52
21 23 31 29 61 63 55 53
17 19 27 25 57 59 51 49
16 18 26 24 56 58 50 48
corresponds with Adamson's "H-bond codon-anticodon magic square" (see page 287 in Pickover's book):
CCC CCU CUU CUC UUC UUU UCU UCC
CCA CCG CUG CUA UUA UUG UCG UCA
CAA CAG CGG CGA UGA UGG UAG UAA
CAC CAU CGU CGC UGC UGU UAU UAC
AAC AAU AGU AGC GGC GGU GAU GAC
AAA AAG AGG AGA GGA GGG GAG GAA
ACA ACG AUG AUA GUA GUG GCG GCA
ACC ACU AUU AUC GUC GUU GCU GCC
when the base-triples are interpreted as quaternary (base-4) numbers, with the following rules: C = 0, A = 1, U = 2, G = 3.
REFERENCES
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.
LINKS
MATHEMATICA
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 *)
PROG
(Python)
def a000695(n):
n=bin(n)[2:]
x=len(n)
return sum(int(n[i])*4**(x - 1 - i) for i in range(x))
def a003188(n): return n^(n>>1)
def a(n, k): return a000695(a003188(n)) + 2*a000695(a003188(k))
for n in range(21): print([a(k, n - k) for k in range(n + 1)]) # Indranil Ghosh, Jun 25 2017
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jul 29 2009
STATUS
approved