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.

Showing 1-10 of 19 results. Next

A071651 Permutation of natural numbers induced by reranking plane binary trees given in the standard lexicographic order (A014486) with an "arithmetic global ranking algorithm", using the bivariate form of A061579 as the packing bijection N x N -> N.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 5, 6, 10, 11, 29, 16, 22, 56, 8, 12, 9, 15, 36, 14, 21, 28, 66, 67, 436, 137, 254, 1597, 37, 79, 46, 121, 667, 106, 232, 407, 2212, 17, 38, 23, 30, 68, 13, 18, 20, 78, 465, 44, 153, 276, 1653, 19, 25, 27, 45, 91, 35, 55, 136, 703, 77, 120, 253, 435, 2278
Offset: 0

Views

Author

Antti Karttunen, May 30 2002

Keywords

Comments

It seems that a(A014137(n)) = a(A014137(n)-1)+1 = A006894(n+1) for all n. - Antti Karttunen, Jul 30 2012

Crossrefs

Inverse permutation: A071652. Cf. also A014486, A061579, A071653, A071654.

A071671 The binary encoding of parenthesizations given in a "global arithmetic order", using A061579 as the packing bijection N X N -> N.

Original entry on oeis.org

10, 1010, 1100, 101010, 110010, 110100, 101100, 11001010, 11010010, 111000, 10101010, 11001100, 1101001010, 11100010, 11010100, 10110010, 1100101010, 1101001100, 1110001010, 1101010010, 11100100, 10110100, 1100110010
Offset: 1

Views

Author

Antti Karttunen, May 30 2002

Keywords

Crossrefs

a(n) = A063171(A071652(n)). Permutation of A063171 and A071672. In particular, applying the automorphism ReflectBinTree (A057163) to A071671(n) yields A071672(n). The length of each term / 2 gives A071673.

A344531 a(n) = Sum_{k >= 0} b_k * 2^A061579(k) for any number n with binary expansion Sum_{k >= 0} b_k * 2^k.

Original entry on oeis.org

0, 1, 4, 5, 2, 3, 6, 7, 32, 33, 36, 37, 34, 35, 38, 39, 16, 17, 20, 21, 18, 19, 22, 23, 48, 49, 52, 53, 50, 51, 54, 55, 8, 9, 12, 13, 10, 11, 14, 15, 40, 41, 44, 45, 42, 43, 46, 47, 24, 25, 28, 29, 26, 27, 30, 31, 56, 57, 60, 61, 58, 59, 62, 63, 512, 513, 516
Offset: 0

Views

Author

Rémy Sigrist, May 22 2021

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
Fixed points correspond to A261195.

Examples

			For n = 42:
- 42 = 2^1 + 2^3 + 2^5,
- A061579(1) = 2,
- A061579(3) = 5,
- A061579(5) = 3,
- so a(42) = 2^2 + 2^5 + 2^3 = 44.
		

Crossrefs

Cf. A000120, A000217, A061579, A261195 (fixed points).

Programs

  • PARI
    a(n) = { my (v=0, e, t=0, w=1); while (n, n-=2^e=valuation(n, 2); while (e>t+w-1, t+=w; w++); v+=2^(2*t+w-1-e)); v }

Formula

a(n) = n iff n belongs to A261195.
A000120(a(n)) = A000120(n).
a(n) < 2^A000217(k) for any n < 2^A000217(k).

A001477 The nonnegative integers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 0

Views

Author

Keywords

Comments

Although this is a list, and lists normally have offset 1, it seems better to make an exception in this case. - N. J. A. Sloane, Mar 13 2010
The subsequence 0,1,2,3,4 gives the known values of n such that 2^(2^n)+1 is a prime (see A019434, the Fermat primes). - N. J. A. Sloane, Jun 16 2010
Also: The identity map, defined on the set of nonnegative integers. The restriction to the positive integers yields the sequence A000027. - M. F. Hasler, Nov 20 2013
The number of partitions of 2n into exactly 2 parts. - Colin Barker, Mar 22 2015
The number of orbits of Aut(Z^7) as function of the infinity norm n of the representative lattice point of the orbit, when the cardinality of the orbit is equal to 8960 or 168.- Philippe A.J.G. Chevalier, Dec 29 2015
Partial sums give A000217. - Omar E. Pol, Jul 26 2018
First differences are A000012 (the "all 1's" sequence). - M. F. Hasler, May 30 2020
See A061579 for the transposed infinite square matrix, or triangle with rows reversed. - M. F. Hasler, Nov 09 2021
This is the unique sequence (a(n)) that satisfies the inequality a(n+1) > a(a(n)) for all n in N. This simple and surprising result comes from the 6th problem proposed by Bulgaria during the second day of the 19th IMO (1977) in Belgrade (see link and reference). - Bernard Schott, Jan 25 2023

Examples

			Triangular view:
   0
   1   2
   3   4   5
   6   7   8   9
  10  11  12  13  14
  15  16  17  18  19  20
  21  22  23  24  25  26  27
  28  29  30  31  32  33  34  35
  36  37  38  39  40  41  42  43  44
  45  46  47  48  49  50  51  52  53  54
		

References

  • Maurice Protat, Des Olympiades à l'Agrégation, suite vérifiant f(n+1) > f(f(n)), Problème 7, pp. 31-32, Ellipses, Paris 1997.

Crossrefs

Cf. A000027 (n>=1).
Cf. A000012 (first differences).
Partial sums of A057427. - Jeremy Gardiner, Sep 08 2002
Cf. A038608 (alternating signs), A001787 (binomial transform).
Cf. A055112.
Cf. Boustrophedon transforms: A231179, A000737.
Cf. A245422.
Number of orbits of Aut(Z^7) as function of the infinity norm A000579, A154286, A102860, A002412, A045943, A115067, A008586, A008585, A005843, A000217.
When written as an array, the rows/columns are A000217, A000124, A152948, A152950, A145018, A167499, A166136, A167487... and A000096, A034856, A055998, A046691, A052905, A055999... (with appropriate offsets); cf. analogous lists for A000027 in A185787.
Cf. A000290.
Cf. A061579 (transposed matrix / reversed triangle).

Programs

Formula

a(n) = n.
a(0) = 0, a(n) = a(n-1) + 1.
G.f.: x/(1-x)^2.
Multiplicative with a(p^e) = p^e. - David W. Wilson, Aug 01 2001
When seen as array: T(k, n) = n + (k+n)*(k+n+1)/2. Main diagonal is 2*n*(n+1) (A046092), antidiagonal sums are n*(n+1)*(n+2)/2 (A027480). - Ralf Stephan, Oct 17 2004
Dirichlet generating function: zeta(s-1). - Franklin T. Adams-Watters, Sep 11 2005
E.g.f.: x*e^x. - Franklin T. Adams-Watters, Sep 11 2005
a(0)=0, a(1)=1, a(n) = 2*a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008
Alternating partial sums give A001057 = A000217 - 2*(A008794). - Eric Desbiaux, Oct 28 2008
a(n) = 2*A080425(n) + 3*A008611(n-3), n>1. - Eric Desbiaux, Nov 15 2009
a(n) = A007966(n)*A007967(n). - Reinhard Zumkeller, Jun 18 2011
a(n) = Sum_{k>=0} A030308(n,k)*2^k. - Philippe Deléham, Oct 20 2011
a(n) = 2*A028242(n-1) + (-1)^n*A000034(n-1). - R. J. Mathar, Jul 20 2012
a(n+1) = det(C(i+1,j), 1 <= i, j <= n), where C(n,k) are binomial coefficients. - Mircea Merca, Apr 06 2013
a(n-1) = floor(n/e^(1/n)) for n > 0. - Richard R. Forberg, Jun 22 2013
a(n) = A000027(n) for all n>0.
a(n) = floor(cot(1/(n+1))). - Clark Kimberling, Oct 08 2014
a(0)=0, a(n>0) = 2*z(-1)^[( |z|/z + 3 )/2] + ( |z|/z - 1 )/2 for z = A130472(n>0); a 1 to 1 correspondence between integers and naturals. - Adriano Caroli, Mar 29 2015
G.f. as triangle: x*(1 + (x^2 - 5*x + 2)*y + x*(2*x - 1)*y^2)/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Jul 22 2025

A038722 Take the sequence of natural numbers (A000027) and reverse successive subsequences of lengths 1,2,3,4,... .

Original entry on oeis.org

1, 3, 2, 6, 5, 4, 10, 9, 8, 7, 15, 14, 13, 12, 11, 21, 20, 19, 18, 17, 16, 28, 27, 26, 25, 24, 23, 22, 36, 35, 34, 33, 32, 31, 30, 29, 45, 44, 43, 42, 41, 40, 39, 38, 37, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 78, 77, 76
Offset: 1

Views

Author

N. J. A. Sloane, May 02 2000

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
The rectangular array having A038722 as antidiagonals is the transpose of the rectangular array given by A000217. Column 1 of array A038722 is A000124 (central polygonal numbers). Array A038722 is the dispersion of the complement of A000124. - Clark Kimberling, Apr 05 2003
a(n) is the smallest number not yet in the sequence such that n + a(n) is one more than a square. - Franklin T. Adams-Watters, Apr 06 2009
From Hieronymus Fischer, Apr 30 2012: (Start)
A reordering of the natural numbers.
The sequence is self-inverse in that a(a(n)) = n.
Also: a(1) = 1, a(n) = m (where m is the least triangular number > a(k) for 1 <= k < n), if the minimal natural number not yet in the sequence is greater than a(n-1), otherwise a(n) = a(n-1)-1. (End)

Examples

			The rectangular array view is
   1    2    4    7   11   16   22   29   37   46
   3    5    8   12   17   23   30   38   47   57
   6    9   13   18   24   31   39   48   58   69
  10   14   19   25   32   40   49   59   70   82
  15   20   26   33   41   50   60   71   83   96
  21   27   34   42   51   61   72   84   97  111
  28   35   43   52   62   73   85   98  112  127
  36   44   53   63   74   86   99  113  128  144
  45   54   64   75   87  100  114  129  145  162
  55   65   76   88  101  115  130  146  163  181
		

References

  • Suggested by correspondence with Michael Somos.
  • R. Honsberger, "Ingenuity in Mathematics", Table 10.4 on page 87.

Crossrefs

A self-inverse permutation of the natural numbers.
Cf. A056011 (boustrophedon).
Cf. A061579.

Programs

  • Haskell
    a038722 n = a038722_list !! (n-1)
    a038722_list = concat a038722_tabl
    a038722_tabl = map reverse a000027_tabl
    a038722_row n = a038722_tabl !! (n-1)
    -- Reinhard Zumkeller, Nov 08 2013
  • Mathematica
    (* Program generates dispersion array T of the increasing sequence f[n] *)
    r=40; r1=12; c=40; c1=12; f[n_] := Floor[n+1/2+Sqrt[2n]]
      (* complement of column 1 *)
    mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]]
    rows = {NestList[f, 1, c]};
    Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}];
    t[i_, j_] := rows[[i, j]];
    TableForm[Table[t[i, j], {i, 1, r1}, {j, 1, c1}]]
    (* A038722 array *)
    Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* A038722 sequence *)
     (* Clark Kimberling, Jun 06 2011, corrected Jan 26 2025 *)
    Table[ n, {m, 12}, {n, m (m + 1)/2, m (m - 1)/2 + 1, -1}] // Flatten (* or *)
    Table[ Ceiling[(Sqrt[8 n + 1] - 1)/2]^2 - n + 1, {n, 78}] (* Robert G. Wilson v, Jun 27 2014 *)
    With[{nn=20},Reverse/@TakeList[Range[(nn(1+nn))/2],Range[nn]]//Flatten] (* Requires Mathematica version 11 or later *) (* Harvey P. Dale, Dec 14 2017 *)
  • PARI
    a(n)=local(t=floor(1/2+sqrt(2*n))); if(n<1, 0, t^2-n+1) /* Paul D. Hanna */
    

Formula

a(n) = (sqrt(2n-1) - 1/2)*(sqrt(2n-1) + 3/2) - n + 2 = A061579(n-1) + 1. Seen as a square table by antidiagonals, T(n, k) = k + (n+k-1)*(n+k-2)/2, i.e., the transpose of A000027 as a square table.
G.f.: g(x) = (x/(1-x))*(psi(x) - x/(1-x) + 2*Sum_{k>=0} k*x^(k*(k+1)/2)) where psi(x) = Sum_{k>=0} x^(k*(k+1)/2) = (1/2)*x^(-1/8)*theta_2(0,x^(1/2)) is a Ramanujan theta function. - Hieronymus Fischer, Aug 08 2007
a(n) = floor(sqrt(2*n) + 1/2)^2 - n + 1. - Clark Kimberling, Jun 05 2011; corrected by Paul D. Hanna, Jun 27 2011
From Hieronymus Fischer, Apr 30 2012: (Start)
a(n) = a(n-1)-1, if a(n-1)-1 > 0 is not in the set {a(k)| 1<=k
a(n) = n for n = 2k(k+1)+1, k >= 0.
a(n+1) = (m+2)(m+3)/2, if 8a(n)-7 is a square of an odd number, otherwise a(n+1) = a(n)-1, where m = (sqrt(8a(n)-7)-1)/2.
a(n) = ceiling((sqrt(8n+1)-1)/2)^2 - n + 1. (End)
G.f. as rectangular array: x*y*(1 - (1 + x)*y + (1 - x + x^2)*y^2)/((1 - x)^3*(1 - y)^3). - Stefano Spezia, Dec 25 2022

A163336 Peano curve in an n X n grid, starting downwards from the top left corner, listed antidiagonally as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), ...

Original entry on oeis.org

0, 5, 1, 6, 4, 2, 47, 7, 3, 15, 48, 46, 8, 14, 16, 53, 49, 45, 9, 13, 17, 54, 52, 50, 44, 10, 12, 18, 59, 55, 51, 39, 43, 11, 23, 19, 60, 58, 56, 38, 40, 42, 24, 22, 20, 425, 61, 57, 69, 37, 41, 29, 25, 21, 141, 426, 424, 62, 68, 70, 36, 30, 28, 26, 140, 142, 431, 427
Offset: 0

Author

Antti Karttunen, Jul 29 2009

Keywords

Examples

			The top left 9 X 9 corner of the array shows how this surjective self-avoiding walk begins (connect the terms in numerical order, 0-1-2-3-...):
   0  5  6 47 48 53 54 59 60
   1  4  7 46 49 52 55 58 61
   2  3  8 45 50 51 56 57 62
  15 14  9 44 39 38 69 68 63
  16 13 10 43 40 37 70 67 64
  17 12 11 42 41 36 71 66 65
  18 23 24 29 30 35 72 77 78
  19 22 25 28 31 34 73 76 79
  20 21 26 27 32 33 74 75 80
		

Crossrefs

Transpose: A163334. Inverse: A163337. a(n) = A163332(A163330(n)) = A163327(A163333(A163328(n))) = A163334(A061579(n)). One-based version: A163340. Row sums: A163342. Row 0: A163481. Column 0: A163480. Central diagonal: A163343.
See A163357 and A163359 for the Hilbert curve.

Programs

  • Mathematica
    b[{n_, k_}, {m_}] := (A[n, k] = m - 1);
    MapIndexed[b, List @@ PeanoCurve[4][[1]]];
    Table[A[n - k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)

Extensions

Name corrected by Kevin Ryde, Aug 28 2020

A163359 Hilbert curve in N x N grid, starting downwards from the top-left corner, listed by descending antidiagonals.

Original entry on oeis.org

0, 3, 1, 4, 2, 14, 5, 7, 13, 15, 58, 6, 8, 12, 16, 59, 57, 9, 11, 17, 19, 60, 56, 54, 10, 30, 18, 20, 63, 61, 55, 53, 31, 29, 23, 21, 64, 62, 50, 52, 32, 28, 24, 22, 234, 65, 67, 49, 51, 33, 35, 27, 25, 233, 235, 78, 66, 68, 48, 46, 34, 36, 26, 230, 232, 236, 79, 77, 71
Offset: 0

Author

Antti Karttunen, Jul 29 2009

Keywords

Examples

			The top left 8x8 corner of the array shows how this surjective self-avoiding walk begins (connect the terms in numerical order, 0-1-2-3-...):
   +0 +3 +4 +5 58 59 60 63
   +1 +2 +7 +6 57 56 61 62
   14 13 +8 +9 54 55 50 49
   15 12 11 10 53 52 51 48
   16 17 30 31 32 33 46 47
   19 18 29 28 35 34 45 44
   20 23 24 27 36 39 40 43
   21 22 25 26 37 38 41 42
		

Crossrefs

Transpose: A163357, a(n) = A163357(A061579(n)). Inverse: A163360. One-based version: A163363. Row sums: A163365. Row 0: A163483. Column 0: A163482. Central diagonal: A062880.
See also A163334 and A163336 for the Peano curve.

Programs

  • Mathematica
    b[{n_, k_}, {m_}] := (A[n, k] = m-1);
    MapIndexed[b, List @@ HilbertCurve[4][[1]]];
    Table[A[n-k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Mar 07 2021 *)

A147995 Array of N X N grid hopping "almost-walk", read by antidiagonals.

Original entry on oeis.org

0, 1, 3, 6, 2, 14, 5, 7, 13, 15, 26, 4, 8, 12, 58, 27, 25, 9, 11, 59, 57, 22, 24, 30, 10, 54, 56, 62, 21, 23, 29, 31, 53, 55, 61, 63, 106, 20, 18, 28, 32, 52, 50, 60, 234, 107, 105, 19, 17, 33, 35, 51, 49, 235, 233, 108, 104, 100, 16, 38, 34, 46, 48, 236, 232, 228, 111
Offset: 0

Author

Roger L. Bagula and Gary W. Adamson, Nov 18 2008

Keywords

Comments

The original name was: "The sequence is an anti-diagonal of the decimal of a mapped 4-ary Gray code matrix as a triangular sequence."
Gary W. Adamson's explanation of the sequence: Here's the conversion rules for the codons, 4-Ary gray code, which "turns out" to be the most appropriate format for mapping the Codons on a gray code Karnaugh map. The "why" this is the appropriate format relates to a degree of trial and error to find the proper fit in terms of the numbers of hydrogen bonds per codon- anticodon. (Antti Karttunen's comment: obscure definition. The "degree of trial and error" should be defined transparently.)
1) The "H-bond codon-anticodon magic square" map by Gary Adamson, published on page 287 of Cliff Pickover's book "Zen of Magic Squares..." looks like this:
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
2) Using the conversion rules: 0 = C, 1 = A, 2 = G, 3 = U, we convert to 4-ary gray code:
000 003 033 030 330 333 303 300
001 002 032 031 331 332 302 301
011 012 022 021 321 322 312 311
010 013 023 020 320 323 313 310
110 113 123 120 220 223 213 210
111 112 122 121 221 222 212 211
101 102 132 131 231 232 202 201
100 103 133 130 230 233 203 200
3) To convert back to decimal:
0 3 14 15 58 57 62 63
1 2 13 12 59 56 61 60
6 7 8 11 54 55 50 49
5 4 9 10 53 52 51 48
26 25 30 31 32 35 46 47
27 24 29 28 33 34 45 44
22 23 18 17 38 39 40 43
21 20 19 16 37 36 41 42
... and that's it! Notice how the 1,2,3,... jumps around, somewhat like a Peano curve, from one 4-unit cell to the next.
Antti Karttunen's notes: The steps 1 & 2 are clear, but the step 3 would not produce the array given here, but instead the array A163239. Furthermore, in Pickover's book the conversion rules C=0, A=1, U=2, G=3 are used, in which case we get the array A163235. Also, the path taken by the terms does not form a continuous Peano curve (Hamiltonian path), because there are discontinuities, e.g., when going from 3 to 4, or from 15 to 16. See A163357/A163359 & A163334/A163336 for examples of continuous Peano/Hilbert curves/paths in an N X N grid. However, this sequence is uniquely defined by the formula a(n) = A163485(A057300(A054238(n))). The 8 X 8 array given at the step 3 is the top left corner of the infinite square array whose antidiagonal gives this sequence.
From Gary W. Adamson, Aug 04 2009: (Start)
This entry was originally only an e mail to the coauthor; but given that the terms are correct, the complete set of rules for the system can be presented.
Using 3 bit terms, we write out the Gray code for (0 - 7) as row headings; doing the same as the left column, then each of the 64 entries places the left column term (of 3 bits) underneath the top row headings. Then reading 2 bits from top to down in each entry, we use (0,0) = C; (1,1) = G; (0,1) = A and (1,0) = U. This gives the Gray code Karnaugh map along with 64 codons:
.
000...001...011...010...110...111...101...100
000...000...000...000...000...000...000...000
CCC...CCU...CUU...CUC...UUC...UUU...UCU...UCC
000...001...011...010...110...111...101...100
001...001...001...001...001...001...001...001
CCA...CCG...CUG...CUA...UUA...UUG...UCG...UCA
000...001...011...010...110...111...101...100
011...011...011...011...011...011...011...011
CAA...CAG...CGG...CGA...UGA...UGG...UAG...UAA
000...001...011...010...110...111...101...100
010...010...010...010...010...010...010...010
CAC...CAU...CGU...CGC...UGC...UGU...UAU...UAC
000...001...011...010...110...111...101...100
110...110...110...110...110...110...110...110
AAC...AAU...AGU...AGC...GGC...GGU...GAU...GAC
000...001...011...010...110...111...101...100
111...111...111...111...111...111...111...111
AAA...AAG...AGG...AGA...GGA...GGG...GAG...GAA
000...001...011...010...110...111...101...100
101...101...101...101...101...101...101...101
ACA...ACG...AUG...AUA...GUA...GUG...GCG...GCA
000...001...011...010...110...111...101...100
100...100...100...100...100...100...100...100
ACC...ACU...AUU...AUC...GUC...GUU...GCU...GCC
.
Next, reading again from top 3 bits to bottom, we convert the base-2 Gray code to 4-ary Gray code using the rules (0,0) = 0; (0,1) = 1; (1,1) = 2; and (1,0) = 3; giving the array given using numbers (0,1,2, and 3) = 4-ary Gray code. The previous 2 maps have the unique Gray code property of having only a 1 bit (or 1 letter) change in any direction: up, down, right, left, including wrap-arounds.
Last part of this system, we need create a linear system of Codons with only 1 bit (letter) change from one term to the next, giving an ordered decimal term for each Codon. This is done by converting the array with the (0,1,2,3) terms to the corresponding decimal term. Thus given the array: 000...003...033...030...330...333...etc; considered as 4-ary Gray code, these terms are equivalent to the array A147995 (then take antidiagonals).
Following the numbers in succession in the array (0 -> 1 -> 2 ->...63) allows for us to have a linear system of Codons with only a 1-letter change from one Codon to the next, as follows: CCC -> CCA -> CCG -> CAU...-> through 63 = UCC. The other entries as of this date in the OEIS do not have the 1-letter (only) change from one associated decimal term to the next. For example, take entry A163235: If the decimal number system (given) is superimposed upon the 64 Codon array, the term 3 corresponds to CCG, but 4 in the left column corresponds to CAC, having a 2-letter change. Similarly, take A163239: If the decimal array in that entry is superimposed on the 64 Codon array, "3" corresponds in position to CCU, but "4" corresponds to CAC; again a 2-letter change. The system given in A147995 preserves the unique 1 (bit/letter) change from one Codon to any neighbor, going in any direction; along with the corresponding linear system with a 1-letter change from one Codon to the next.
Last, we submit for each Codon the number of hydrogen bonds per codon/anti-codon using the following substitution rules: (C,G) = 3; (A,U) = 2, then add.
This gives following array which we superimpose on the Codon array, giving the correct number of Hydrogen bonds for each Codon and anti-Codon:
.
9 8 7 8 7 6 7 8
8 9 8 7 6 7 8 7
7 8 9 8 7 8 7 6
8 7 8 9 8 7 6 7
7 6 7 8 9 8 7 8
6 7 8 7 8 9 8 7
6 8 7 6 7 8 9 8
8 7 6 7 8 7 8 9
... (a semi-magic square with a binomial distribution of (1, 3, 3, 1) as to (6, 7, 8, 9) in every row and column.
Example: CUG (3rd from left, row next to top) has (C=3, U=2, G=3), total 8.
The anti-Codon of CUG = GAC and likewise has 8 hydrogen bonds. (End)
From Gary W. Adamson, Aug 04 2009: (Start)
The final outcome: superimposing the Codon map onto the decimal term map, we obtain a linear sequence of Codons with a 1-letter change between neighbors (which begs the question of how many such permutations are possible with the 1-letter change). The method of A147995 gives:
.
0 CCC; 16 AUC; 32 GGC; 48 UAC
1 CCA; 17 AUA; 33 GGA; 49 UAA
2 CCG; 18 AUG; 34 GGG; 50 UAG
3 CCU; 19 AUU; 35 GGU; 51 UAU
4 CAU; 20 ACU; 36 GUU; 52 UGU
5 CAC; 21 ACC; 37 GUC; 53 UGC
6 CAA; 22 ACA; 38 GUA; 54 UGA
7 CAG; 23 ACG; 39 GUG; 55 UGG
8 CGG; 24 AAG; 40 GCG; 56 UUG
9 CGU; 25 AAU; 41 GCU; 57 UUU
10 CGC; 26 AAC; 42 GCC; 58 UUC
11 CGA; 27 AAA; 43 GCA; 59 UUA
12 CUA; 28 AGA; 44 GAA; 60 UCA
13 CUG; 29 AGG; 45 GAG; 61 UCG
14 CUU; 30 AGU; 46 GAU; 62 UCU
15 CUC; 31 AGC; 47 GAC; 63 UCC
(End)
From Gary W. Adamson, Aug 08 2009: (Start)
The 8 X 8 array of hydrogen bonds can be derived from the 3rd row of A088696 (1, 2, 3, 2, 3, 4, 3, 2) using a simple conversion rule. Given the terms of A088696, each is replaced with its complement to 10: (1->9; 2->8; 3->7; 4->6) Note that the leftmost column going down should read: (9, 8, 7, 8, 7, 6, 7, 8) matching the top row from left to right. (End)
From Gary W. Adamson, Aug 13 2009: (Start)
Gray code -> <- Binary conversion rules: in either direction for any base; "N-Ary Gray code" -> "N-ary" or in the other direction.
.
First, N-Ary Gray code to N-Ary conversion. Write the N-Ary on a top row with the Gray code on the bottom row in both conversion variants. Given a Gray code on the bottom row, the N-Ary may be defined as "running sums MOD N" of the bottom row; then use the following rules: Leftmost term is the same.
Next, use the sum of term (n-th) in the top row from the left, and the (n+1)-th term in the bottom row, MOD N. By way of example:
Convert Gray code base 8, 3641063 to 8-ary. This gives initially,
3..................
3..6..4..1..0..6..3
.
Then (3 + 6) MOD 8 = 1 so we place a "1" above the 6 going to the right.
Then (1 + 4) MOD 8 = 5 so we place a "5" above the 5.
Continuing with this procedure, we obtain:
3 1 5 6 6 4 7 8-Ary
3 6 4 1 0 6 3 8-Ary Gray code
.
Using the 8 X 8 4-Ary chart, convert 133 (bottom row, 4th from the left) to 4-Ary then to decimal. Our setup is:
1
1 3 3
getting (1, 0, 3). Then placing powers of 4 above the 4-Ary, = 1*16 + 3 = 19 as shown in the accompanying chart, 4-Ary Gray code 133 = 19 decimal.
.
Rules for converting an N-Ary number to the corresponding N-Ary Gray code:
As before, we place the N-Ary on the top row with ongoing results on the bottom row = N-Ary Gray code.
In the top row from left to right, through through the entire number looking at pairs (n-th and (n+1)-th terms), if (n+1)-th is > than n-th, take the difference and write it down. If term (n+1) = n-th term, write down a "0".
If term (n+1) < n-th term we ADD N (as N-Ary) to (n+1)-th term then take the difference. Examples:
Find the Gray code counterpart to 2 1 base 4 = 9 decimal.
Ans.: next term (1) < (2) so we add 4 to the 1 getting 5, then take (5 - 2) = 3. So given 4-Ary 21, the corresponding Gray code term = 23
.
Find the Gray code counterpart to binary 10110 = 22 decimal. First, go through the terms writing down the difference if next term > current: (and writing "0" if next term = current term)
1, 0, 1, 1, 0
1.....1..0...
Add "2" to the terms above the vacant places and take the difference from previous term, top row:
1, 1, 1, 0, 1 final result = Gray code for 22 decimal.
.
Given 8-Ary number 3156647, base 8. Using steps (1-2) we get
3, 1, 5, 6, 6, 4, 7
3.....4..1..0.....3; then add 8 to top term for vacant places then take the difference, getting:
3..6..4..1..0..6..3; = 8-ary Gray code given 8-Ary (3 1 5 6 6 4 7).
.
Given the foregoing rules and examples, access the charts accompanying the DNA codons. 3 digit terms = 4-Ary Gray code. Convert 133 (bottom row) to 4-Ary then to decimal. We get:
1
1 0 3 = (16 + 0 + 3) = 19
Convert 39 decimal to 4-Ary then to 4-Ary Gray code. 39 = 213 4-Ary = (2*16 + 4 + 3); then
2 1 3
2...2; then add "4" to the 1 and take the difference = (5 - 2) = 3. = 2 3 2 = 4-Ary Gray code for decimal 39 as shown in the dual charts, next to bottom row, third from the right: (232 corresponds to 39) in the accompanying chart.
Properties of Gray code: sum of terms MOD N = decimal MOD N. Example: 232 corresponds to 19, then (2 + 3 + 2) MOD 4 = 3, and 19 == 3 MOD 4.
Another property: Highest exponent of N dividing a decimal term.
Access term (n-1) writing the Gray code on the top row and Gray code for n-th term on the bottom. Determine column change = (0, 1, 2, ...) starting from the right. Let the column = c. then c is the highest exponent of N dividing n-th term. Examples: 40 in 4-Ary Gray code = 202, while 41 = 203. Change is in column 0 so 203 can be divided by 4^0. But 44 in 4-Ary Gray code = 211 while 43 = 201. Bit change is in column 1 so 4^1 divides 44. (End)

Examples

			Antidiagonals begin:
  { 0},
  { 1,  3},
  { 6,  2, 14},
  { 5,  7, 13, 15},
  {26,  4,  8, 12, 58},
  {27, 25,  9, 11, 59, 57},
  {22, 24, 30, 10, 54, 56, 62},
  {21, 23, 29, 31, 53, 55, 61, 63}
		

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.

Crossrefs

a(n) = A163545(A061579(n)), i.e., transpose of A163545. Antidiagonal sums: A163484. Inverse: A163544. See also A163233, A163235, A163237, A163239, A163357, A163359.
Cf. A088696. - Gary W. Adamson, Aug 08 2009

Programs

  • Mathematica
    M = {{0, 3, 14, 15, 58, 57, 62, 63}, {1, 2, 13, 12, 59, 56, 61, 60}, {6, 7, 8, 11, 54, 55, 50, 49}, {5, 4, 9, 10, 53, 52, 51, 48}, {26, 25, 30, 31, 32, 35, 46, 47}, {27, 24, 29, 28, 33, 34, 45, 44}, {22, 23, 18, 17, 38, 39, 40, 43}, {21, 20, 19, 16, 37, 36, 41, 42}}; Table[Table[M[[n - m + 1, m]], {m, 1, n}], {n, 1, Length[M]}]; Flatten[%]

Formula

M = {{0, 3, 14, 15, 58, 57, 62, 63}, {1, 2, 13, 12, 59, 56, 61, 60}, {6, 7, 8, 11, 54, 55, 50, 49}, {5, 4, 9, 10, 53, 52, 51, 48}, {26, 25, 30, 31, 32, 35, 46, 47}, {27, 24, 29, 28, 33, 34, 45, 44}, {22, 23, 18, 17, 38, 39, 40, 43}, {21, 20, 19, 16, 37, 36, 41, 42}}; t(n,m) = antidiagonal(M).
a(n) = A163485(A057300(A054238(n))). - Antti Karttunen, Aug 01 2009

Extensions

Edited, extended, keywords tabl and obsc added and offset changed from 1 to 0 by Antti Karttunen, Aug 01 2009

A094310 Triangle read by rows: T(n,k), the k-th term of the n-th row, is the product of all numbers from 1 to n except k: T(n,k) = n!/k.

Original entry on oeis.org

1, 2, 1, 6, 3, 2, 24, 12, 8, 6, 120, 60, 40, 30, 24, 720, 360, 240, 180, 144, 120, 5040, 2520, 1680, 1260, 1008, 840, 720, 40320, 20160, 13440, 10080, 8064, 6720, 5760, 5040, 362880, 181440, 120960, 90720, 72576, 60480, 51840, 45360, 40320, 3628800, 1814400, 1209600, 907200, 725760, 604800, 518400, 453600, 403200, 362880
Offset: 1

Author

Amarnath Murthy, Apr 29 2004

Keywords

Comments

The sum of the rows gives A000254 (Stirling numbers of first kind). The first column and the leading diagonal are factorials given by A000142 with offsets of 0 and 1.
T(n,k) is the number of length k cycles in all permutations of {1..n}.
Second diagonal gives A001048(n). - Anton Zakharov, Oct 24 2016
T(n,k) is the number of permutations of [n] with all elements of [k] in a single cycle. To prove this result, let m denote the length of the cycle containing {1,..,k}. Letting m run from k to n, we obtain T(n,k) = Sum_{m=k..n} (C(n-k,m-k)*(m-1)!*(n-m)!) = n!/k. See an example below. - Dennis P. Walsh, May 24 2020

Examples

			Triangle begins as:
      1;
      2,     1;
      6,     3,     2;
     24,    12,     8,     6;
    120,    60,    40,    30,   24;
    720,   360,   240,   180,  144,  120;
   5040,  2520,  1680,  1260, 1008,  840,  720;
  40320, 20160, 13440, 10080, 8064, 6720, 5760, 5040;
  ...
T(4,2) counts the 12 permutations of [4] with elements 1 and 2 in the same cycle, namely, (1 2)(3 4), (1 2)(3)(4), (1 2 3)(4), (1 3 2)(4), (1 2 4)(3), (1 4 2)(3), (1 2 3 4), (1 2 4 3), (1 3 2 4), (1 3 4 2), (1 4 2 3), and (1 4 3 2). - _Dennis P. Walsh_, May 24 2020
		

Crossrefs

Programs

  • Maple
    seq(seq(n!/k, k=1..n), n=1..10);
  • Mathematica
    Table[n!/k, {n,10}, {k,n}]//Flatten
    Table[n!/Range[n], {n,10}]//Flatten (* Harvey P. Dale, Mar 12 2016 *)

Formula

E.g.f. for column k: x^k/(k*(1-x)).
T(n,k)*k = n*n! = A001563(n).

Extensions

More terms from Philippe Deléham, Jun 11 2005

A179216 Permutation of triangular array of numbers (greater than 1) arranged by prime signature.

Original entry on oeis.org

2, 4, 3, 6, 9, 5, 8, 10, 25, 7, 12, 27, 14, 49, 11, 16, 18, 125, 15, 121, 13, 24, 81, 20, 343, 21, 169, 17, 30, 40, 625, 28, 1331, 22, 289, 19, 32, 42, 54, 2401, 44, 2197, 26, 361, 23, 36, 243, 66, 56, 14641, 45, 4913, 33, 529, 29, 48, 100, 3125, 70, 88, 28561, 50, 6859
Offset: 0

Author

Will Nicholes, Jul 10 2010

Keywords

Comments

The left diagonal is the sequence of primes (A000040). The right diagonal is sequence A025487 (least prime signatures).

Formula

a(n) = A061579(A095904(n))
Showing 1-10 of 19 results. Next