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-8 of 8 results.

A036991 Numbers k with the property that in the binary expansion of k, reading from right to left, the number of 0's never exceeds the number of 1's.

Original entry on oeis.org

0, 1, 3, 5, 7, 11, 13, 15, 19, 21, 23, 27, 29, 31, 39, 43, 45, 47, 51, 53, 55, 59, 61, 63, 71, 75, 77, 79, 83, 85, 87, 91, 93, 95, 103, 107, 109, 111, 115, 117, 119, 123, 125, 127, 143, 151, 155, 157, 159, 167, 171, 173, 175, 179, 181, 183, 187, 189, 191, 199, 203
Offset: 1

Views

Author

Keywords

Comments

List of binary words that correspond to a valid pairing of parentheses. - Joerg Arndt, Nov 27 2004
This sequence includes as subsequences A000225, A002450, A007583, A036994, A052940, A112627, A113836, A113841, A290114; and also A015521 (without 0), A083713 (without 0), A086224 (without 6), A182512 (without 0). - Gennady Eremin, Nov 27 2021 and Aug 26 2023
Partial differences are powers of 2 (cf. A367626, A367627). - Gennady Eremin, Dec 23 2021
This is the sequence A030101(A014486(n)), n >= 0, sorted into ascending order. See A014486 for more references, illustrations, etc., concerning Dyck paths and other associated structures enumerated by the Catalan numbers. - Antti Karttunen, Sep 25 2023
The terms in this sequence with a given length in base 2 are counted by A001405. For example, the number of terms of bit length k=5 (these are 19, 21, 23, 27, 29, and 31) is equal to A001405(k-1) = A001405(4) = 6. - Gennady Eremin, Nov 07 2023

Examples

			From _Joerg Arndt_, Dec 05 2021: (Start)
List of binary words with parentheses for those in the sequence (indicated by P). The binary words are scanned starting from the least significant bit, while the parentheses words are written left to right:
     Binary   Parentheses (if the value is in the sequence)
00:  ..... P  [empty string]
01:  ....1 P   ()
02:  ...1.
03:  ...11 P   (())
04:  ..1..
05:  ..1.1 P   ()()
06:  ..11.
07:  ..111 P   ((()))
08:  .1...
09:  .1..1
10:  .1.1.
11:  .1.11 P   (()())
12:  .11..
13:  .11.1 P   ()(())
14:  .111.
15:  .1111 P   (((())))
16:  1....
17:  1...1
18:  1..1.
19:  1..11 P   (())()
(End)
		

Crossrefs

Cf. A350577 (primes subsequence).
See also A014486, A030101, A036988, A036990, A036992. A036994 is a subset (requires the count of zeros to be strictly less than the count of 1's).
See also A030308, A000225, A002450, A007583, A350346, A367625, A367626 & A367627 (first differences).

Programs

  • Haskell
    a036991 n = a036991_list !! (n-1)
    a036991_list = filter ((p 1) . a030308_row) [0..] where
       p     []    = True
       p ones (0:bs) = ones > 1 && p (ones - 1) bs
       p ones (1:bs) = p (ones + 1) bs
    -- Reinhard Zumkeller, Jul 31 2013
    
  • Maple
    q:= proc(n) local l, t, i; l:= Bits[Split](n); t:=0;
          for i to nops(l) do t:= t-1+2*l[i];
            if t<0 then return false fi
          od: true
        end:
    select(q, [$0..300])[];  # Alois P. Heinz, Oct 09 2019
  • Mathematica
    moreOnesRLQ[n_Integer] := Module[{digits, len, flag = True, iter = 1, ones = 0, zeros = 0}, digits = Reverse[IntegerDigits[n, 2]]; len = Length[digits]; While[flag && iter < len, If[digits[[iter]] == 1, ones++, zeros++]; flag = ones >= zeros; iter++]; flag]; Select[Range[0, 203], moreOnesRLQ] (* Alonso del Arte, Sep 21 2011 *)
    Join[{0},Select[Range[210],Min[Accumulate[Reverse[IntegerDigits[#,2]]/.{0->-1}]]>-1&]] (* Harvey P. Dale, Apr 18 2014 *)
  • PARI
    select( {is_A036991(n,c=1)=!n||!until(!n>>=1,(c-=(-1)^bittest(n,0))||return)}, [0..99]) \\ M. F. Hasler, Nov 26 2021
  • Python
    def ok(n):
        if n == 0: return True # by definition
        count = {"0": 0, "1": 0}
        for bit in bin(n)[:1:-1]:
            count[bit] += 1
            if count["0"] > count["1"]: return False
        return True
    print([k for k in range(204) if ok(k)]) # Michael S. Branicky, Nov 25 2021
    
  • Python
    from itertools import count, islice
    def A036991_gen(): # generator of terms
        yield 0
        for n in count(1):
            s = bin(n)[2:]
            c, l = 0, len(s)
            for i in range(l):
                c += int(s[l-i-1])
                if 2*c <= i:
                    break
            else:
                yield n
    A036991_list = list(islice(A036991_gen(),20)) # Chai Wah Wu, Dec 30 2021
    

Formula

If a(n) = A000225(k) for some k, then a(n+1) = a(n) + A060546(k). - Gennady Eremin, Nov 07 2023

Extensions

More terms from Erich Friedman
Edited by N. J. A. Sloane, Sep 14 2008 at the suggestion of R. J. Mathar
Offset corrected and example adjusted accordingly by Reinhard Zumkeller, Jul 31 2013

A103333 Number of closed walks on the graph of the (7,4) Hamming code.

Original entry on oeis.org

1, 3, 24, 192, 1536, 12288, 98304, 786432, 6291456, 50331648, 402653184, 3221225472, 25769803776, 206158430208, 1649267441664, 13194139533312, 105553116266496, 844424930131968, 6755399441055744, 54043195528445952, 432345564227567616
Offset: 0

Views

Author

Paul Barry, Jan 31 2005

Keywords

Comments

Counts closed walks of length 2n at the degree 3 node of the graph of the (7,4) Hamming code. With interpolated zeros, counts paths of length n at this node.
a(n+1) = A157176(A016945(n)). - Reinhard Zumkeller, Feb 24 2009
For n>0: a(n) = A083713(n) - A083713(n-1). - Reinhard Zumkeller, Feb 22 2010

References

  • David J.C. Mackay, Information Theory, Inference and Learning Algorithms, CUP, 2003, p. 19

Crossrefs

Cf. A000302, A004171. - Vincenzo Librandi, Jan 22 2009

Programs

Formula

G.f.: (1-5*x)/(1-8*x);
a(n) = (3*8^n + 5*0^n)/8.
a(n) = 8*a(n-1) for n > 0. - Harvey P. Dale, Mar 02 2012

A033129 Base-2 digits are, in order, the first n terms of the periodic sequence with initial period [1,1,0].

Original entry on oeis.org

0, 1, 3, 6, 13, 27, 54, 109, 219, 438, 877, 1755, 3510, 7021, 14043, 28086, 56173, 112347, 224694, 449389, 898779, 1797558, 3595117, 7190235, 14380470, 28760941, 57521883, 115043766, 230087533, 460175067, 920350134, 1840700269
Offset: 0

Views

Author

Keywords

Comments

Number of moves to separate a Hanoi Tower into two towers of even resp. odd stones. - Martin von Gagern, May 26 2004
From Reinhard Zumkeller, Feb 22 2010: (Start)
Terms of A173593 with initial digits '11' in binary representation: a(n) = A173593(2*n-3) for n>0;
for n>0: a(3*n-1) = A083713(n);
a(n+1) - a(n) = abs(A078043(n)). (End)

Crossrefs

Cf. A011655 (repeat 0,1,1), A289006 (the same in octal).
Cf. A057744, A294627 (first differences).

Programs

  • Mathematica
    Table[(1/14)*(-9 - 2*(-1)^Floor[(2 n)/3] + (-1)^(1 + Floor[(1/3)*(7 + 2 n)]) + 3*2^(2 + n)), {n, 0, 100}] (* John M. Campbell, Dec 26 2016 *)
    Table[FromDigits[PadRight[{},n,{1,1,0}],2],{n,0,40}] (* Harvey P. Dale, Oct 02 2022 *)
  • PARI
    A033129(n)=3<<(n+1)\7 \\ M. F. Hasler, Jun 23 2017
    
  • Python
    print([(6*2**n//7) for n in range(50)]) # Karl V. Keller, Jr., Jul 11 2022

Formula

From Paul Barry, Jan 23 2004: (Start)
Partial sums of abs(A078043).
G.f.: x*(1+x)/((1-x)*(1-2*x)*(1+x+x^2)) = x*(1+x)/(1-2*x-x^3+2*x^4).
a(n) = (6/7)*2^n - (4/21)*cos(2*Pi*n/3) - (2/21)*sqrt(3)*sin(2*Pi*n/3) - 2/3. (End)
a(n) = a(n-3) + 3 * 2^(n-3). - Martin von Gagern, May 26 2004
a(n+1) = 2*a(n) + 1 - 0^((a(n)+1) mod 4). - Reinhard Zumkeller, Feb 22 2010
a(n) = floor(2^(n+1)*3/7). - Jean-Marie Madiot, Oct 05 2012
a(n) = (1/14)*(-9 - 2*(-1)^floor((2n)/3) + (-1)^(floor((2*n + 7)/3) + 1) + 3*2^(n + 2)). - John M. Campbell, Dec 26 2016

A173593 Numbers having in binary representation exactly two ones in three consecutive digits.

Original entry on oeis.org

3, 5, 6, 11, 13, 22, 27, 45, 54, 91, 109, 182, 219, 365, 438, 731, 877, 1462, 1755, 2925, 3510, 5851, 7021, 11702, 14043, 23405, 28086, 46811, 56173, 93622, 112347, 187245, 224694, 374491, 449389, 748982, 898779, 1497965, 1797558, 2995931, 3595117
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 22 2010

Keywords

Comments

a(2*n-1) = A033129(n+1);
a(3*n-2) = A113836(n+1);
a(6*n-5) = A083713(n);
a(2*n) - a(2*n-1) = A077947(n+1);
a(2*n+1) - a(2*n) = A077947(n).

Examples

			a(10) =   91 =      1011011_2
a(11) =  109 =      1101101_2
a(12) =  182 =     10110110_2
a(13) =  219 =     11011011_2
a(14) =  365 =    101101101_2
a(15) =  438 =    110110110_2
a(16) =  731 =   1011011011_2
a(17) =  877 =   1101101101_2
a(18) = 1462 =  10110110110_2
a(19) = 1755 =  11011011011_2
a(20) = 2925 = 101101101101_2
		

Crossrefs

Cf. A007088.
Bisections A033129, A033120.

Programs

  • Mathematica
    LinearRecurrence[{0, 2, 1, 0, -2}, {3, 5, 6, 11, 13}, 50] (* Jean-François Alcover, Feb 17 2018 *)

Formula

From R. J. Mathar, Feb 24 2010: (Start)
a(n) = 2*a(n-2) + a(n-3) - 2*a(n-5).
G.f.: x*(-3-5*x+2*x^3+4*x^4)/ ((1-x) * (1+x+x^2) * (2*x^2-1)). (End)

A249544 Array read by antidiagonals: T(m,n) read in binary is a palindrome with m runs of n ones separated by single zeros.

Original entry on oeis.org

1, 3, 5, 7, 27, 21, 15, 119, 219, 85, 31, 495, 1911, 1755, 341, 63, 2015, 15855, 30583, 14043, 1365, 127, 8127, 128991, 507375, 489335, 112347, 5461, 255, 32639, 1040319, 8255455, 16236015, 7829367, 898779, 21845, 511, 130815, 8355711
Offset: 1

Views

Author

Tilman Piesk, Oct 31 2014

Keywords

Comments

The entries in this array are all in A194602, and therefore can be interpreted as integer partitions: T(m,n) is the integer partition with m times the addend n+1, and no other non-one addends. The array A249543 contains the corresponding indices of A194602.

Examples

			Array starts:                                          Binary:
  n    1      2       3         4          5
m
1      1      3       7        15         31               1        11          111
2      5     27     119       495       2015             101     11011      1110111
3     21    219    1911     15855     128991           10101  11011011  11101110111
4     85   1755   30583    507375    8255455
5    341  14043  489335  16236015  528349151
		

Crossrefs

Cf. A249543, A194602; Rows: A000225, A129868; Columns: A002450, A083713.

Programs

  • PHP
    A249544($m, $n) {
    // a                  b            c
    // ( 2^(n+1)^m -1 ) * ( 2^n -1 ) / ( 2^(n+1) -1 )
    $a = gmp_sub( gmp_pow( gmp_pow(2,$n+1), $m ), 1 );
    $b = gmp_sub( gmp_pow(2,$n), 1 );
    $c = gmp_sub( gmp_pow(2,$n+1), 1 );
    $return = gmp_div_q( gmp_mul($a,$b), $c );
    return gmp_strval($return);
    }

Formula

T(m,n) = ( 2^(n+1)^m -1 ) * ( 2^n -1 ) / ( 2^(n+1) -1 ).

A363146 Triangle T(n,k) in which the n-th row encodes the inverse of a 3n X 3n Jacobi matrix, with 1's on the lower, main, and upper diagonals in GF(2), where the encoding consists of the decimal representations for the binary rows (n >= 1, 1 <= k <= 3n).

Original entry on oeis.org

3, 7, 6, 27, 59, 48, 3, 55, 54, 219, 475, 384, 27, 443, 432, 3, 439, 438, 1755, 3803, 3072, 219, 3547, 3456, 27, 3515, 3504, 3, 3511, 3510, 14043, 30427, 24576, 1755, 28379, 27648, 219, 28123, 28032, 27, 28091, 28080, 3, 28087, 28086, 112347, 243419, 196608, 14043, 227035, 221184, 1755, 224987, 224256, 219, 224731
Offset: 1

Views

Author

Nei Y. Soma, May 19 2023

Keywords

Comments

Each term of the sequence encodes a line of the inverse of a Jacobi matrix that has 1s on its lower, main, and upper diagonals in GF(2). The associated inverse matrix column values come from the binary representation of that base-10 number, being a bit per column. These matrices have ascending and consecutive multiples of 3 sizes. If the binary number has fewer bits than the number of columns, it must be zero-padded to the left. To obtain the inverse matrices in real numbers instead of GF(2), alternate between + and - between the 1s in a row. If a row is a multiple of 3, alternate between - and +. The determinants of these 3m x 3m Jacobi matrices are 1 in GF(2), as proven by Sutner (1989), and alternate between -1 and 1 in R if m is odd or even, as proven by Melo (1987).
The recurrence, in line 3, uses the Iverson notation as presented in Graham, Knuth, and Patashnik (2002).
The proof of the correctness of that sequence of inverses is done by induction.

Examples

			For n = 1, the Jacobi 3 X 3 matrix has as rows
     1, 1, 0
     1, 1, 1
     0, 1, 1.
Its inverse has the rows
     0, 1, 1
     1, 1, 1
     1, 1, 0.
Representing these rows as decimal numbers the first three terms of the sequence are: 3, 7, and 6.
The next terms in the sequence occur for n = 2, given a sequence of six numbers. The Jacobi 6 X 6 matrix has as its rows:
      1, 1, 0, 0, 0, 0
      1, 1, 1, 0, 0, 0
      0, 1, 1, 1, 0, 0
      0, 0, 1, 1, 1, 0
      0, 0, 0, 1, 1, 1
      0, 0, 0, 0, 1, 1.
Its inverse has as rows:
      0, 1, 1, 0, 1, 1
      1, 1, 1, 0, 1, 1
      1, 1, 0, 0, 0, 0
      0, 0, 0, 0, 1, 1
      1, 1, 0, 1, 1, 1
      1, 1, 0, 1, 1, 0.
These 6 latter rows from binary to decimal give the next 6 terms of the sequence: 27, 49, 48, 3, 55, and 54.
Triangle T(n,k) begins:
     3,    7,    6;
    27,   59,   48,   3,   55,   54;
   219,  475,  384,  27,  443,  432,  3,  439,  438;
  1755, 3803, 3072, 219, 3547, 3456, 27, 3515, 3504, 3, 3511, 3510;
  ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Boston, 2nd Ed., 12th printing, 2002, pp. 24-25.
  • P. Lancaster and M. Tismenetsky, The Theory of Matrices, Academic Press, Boston, 1985, p. 35.
  • J. P. Melo, Reversibility of John von Neumann cellular automata, M.Sc. Thesis, Division of Computer Science, Instituto Tecnológico de Aeronáutica, 1997 (in Portuguese), p. 18.
  • K. Sutner, Linear Cellular Automata and the Garden-of-Eden, The Mathematical Intelligencer, 11(2), 1989, 49-53, p. 52.

Crossrefs

Column k=1 gives A083713.
Column k=3 gives A083233.
T(n,3n) gives A125837(n+1).
T(n,3n-1) gives A083068.
T(n,3n-2) gives A010701.
Cf. A038184 one-dimensional cellular automaton (Rule 150) in a tape with 3n cells has as adjacency matrix the Jacobi matrices, 3n X 3n, with 1s on the lower, main and upper diagonals and the operations on it are in GF(2).

Programs

  • Maple
    T:= n-> (M-> seq(add(abs(M[j, n*3-i])*2^i, i=0..n*3-1), j=1..n*3))
                   (Matrix(n*3, (i, j)-> `if`(abs(i-j)<2, 1, 0))^(-1)):
    seq(T(n), n=1..10);  # Alois P. Heinz, May 20 2023
  • Mathematica
    sequence = {};
    m = 6;
    For[k = 1, k <= m, k++, {
      n = 3*k;
      J = ConstantArray[0, {n, n}];
      For[i = 1, i < n, i++,
       J[[i, i]] = J[[i + 1, i]] = J[[i, i + 1]] = 1];
      J[[1, 1]] = J[[n, n]] = 1;
      InvJ = Mod[Inverse[J], 2];
      For[i = 1, i <= n, i++, AppendTo[sequence, FromDigits[InvJ[[i]], 2]]]
      }
     ]
    sequence
  • PARI
    row(n)=my(m=3*n, A=lift(matrix(m, m, i, j, Mod(abs(i-j)<=1, 2))^(-1))); vector(m, i, fromdigits(A[i,], 2)) \\ Andrew Howroyd, May 20 2023

Formula

The recurrence has as its base: r(1, 1) = 3; r(2, 1) = 7 and r(3, 1) = 6;
For 2 <= k <= m, and i = 1, 2, ..., 3(k-1):
r(i, k) = 8*r(i, k-1) + r(1,1) (i != 0 (mod 3)).
And r(3k-2, k) = r(1, 1);
r(3k-1, k) = 8*r(3(k-1), k-1) + r(2,1);
r(3k, k) = 8*r(3(k-1), (k-1)) + r(3, 1).

A067585 Binary representation of a(n) is obtained thus: replace every digit in the binary representation of n with "1" if the sum of its neighbors is 1 and with "0" otherwise.

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Jan 31 2002

Keywords

Comments

The result of one application of the following "game of life" rule to the binary representation of n: ("1" denotes a living cell, "0" a dead cell) A living cell survives, or a dead cell becomes alive, in the next generation iff the sum of its neighbors is 1 (sum = 0 or 2 implies death from isolation or overcrowding, respectively).
For n such that a(n) = n (fixed points) cf. A083713. Iteration of the mapping leads to one of these fixed points.

Examples

			6 (decimal) = 110 -> 111, hence a(6) = 7; 21 (decimal) = 10101 -> 00000, hence a(21) = 0. Iteration on 13 gives 13 -> 12 -> 14 -> 11 -> 3, or 1101 -> 1100 -> 1110 -> 1011 -> 11 in binary.
		

Crossrefs

Cf. A083713.

Programs

  • PARI
    {b2to10(n)=local(f,d,k); f=1; k=0; while(n>0,d=divrem(n,10); n=d[1]; k=k+f*d[2]; f=2*f); k}
    {for(n=0,77,v=concat(0,binary(2*n)); s="0"; for(j=1,length(v)-2,s=concat(s,v[j]!=v[j+2])); print1(b2to10(eval(s)),","))}

Extensions

Edited and extended by Klaus Brockhaus, Jun 14 2003

A363099 Triangle T(n,k) in which the n-th row encodes the inverse of a 3n+1 X 3n+1 Jacobi matrix, with 1's on the lower, main, and upper diagonals in GF(2), where the encoding consists of the decimal representations for the binary rows (n >= 1, 1 <= k <= 3n+1).

Original entry on oeis.org

11, 3, 12, 13, 91, 27, 96, 107, 3, 108, 109, 731, 219, 768, 859, 27, 864, 875, 3, 876, 877, 5851, 1755, 6144, 6875, 219, 6912, 7003, 27, 7008, 7019, 3, 7020, 7021, 46811, 14043, 49152, 55003, 1755, 55296, 56027, 219, 56064, 56155, 27, 56160, 56171, 3, 56172, 56173, 374491, 112347, 393216, 440027, 14043, 442368
Offset: 1

Views

Author

Nei Y. Soma, May 20 2023

Keywords

Comments

Each term in the sequence encodes a line of the inverse of a Jacobi matrix that has 1s on its lower, main, and upper diagonals in GF(2). The associated inverse matrix column values come from the binary representation of that base-10 number, being a bit per column. These matrices start with a 4 X 4 matrix and the consecutive terms came by adding ascending and consecutive multiples of 3. If the binary number has fewer bits than the number of columns, it must be zero-padded to the left. To obtain the inverse matrices in real numbers instead of GF(2), alternate between + and - between the 1s in a row. If a row is a multiple of 3, alternate between - and +. The determinants of these 3m+1 X 3m+1 Jacobi matrices are 1 in GF(2), and alternate between -1 and 1 in R if m is odd or even. These properties were proven by Sutner (1989) and Melo (1997), respectively.

Examples

			For m = 1, the Jacobi 4 X 4 matrix has as rows
     1, 1, 0, 0
     1, 1, 1, 0
     0, 1, 1, 1
     0, 0, 1, 1
Its inverse has the rows
     1, 0, 1, 1
     0, 0, 1, 1
     1, 1, 0, 0
     1, 1, 0, 1
Representing these rows as binary numbers in base 10 the first three terms of the sequence are: 11, 3, 12, 13.
The next numbers in the sequence occur for m = 2, given a sequence of six numbers. The Jacobi 7 X 7 matrix has as its rows:
     1, 1, 0, 0, 0, 0, 0
     1, 1, 1, 0, 0, 0, 0
     0, 1, 1, 1, 0, 0, 0
     0, 0, 1, 1, 1, 0, 0
     0, 0, 0, 1, 1, 1, 0
     0, 0, 0, 0, 1, 1, 1
     0, 0, 0, 0, 0, 1, 1
Its inverse has as rows:
     1, 0, 1, 1, 0, 1, 1
     0, 0, 1, 1, 0, 1, 1
     1, 1, 0, 0, 0, 0, 0
     1, 1, 0, 1, 0, 1, 1
     0, 0, 0, 0, 0, 1, 1
     1, 1, 0, 1, 1, 0, 0
     1, 1, 0, 1, 1, 0, 1
These 7 latter rows from binary to base 10 give the next 7 terms of the sequence: 91, 27, 96, 107, 3, 108, 109.
Triangle T(n,k) begins:
    11,    3,   12,   13;
    91,   27,   96,  107,   3,  108,  109;
   731,  219,  768,  859,  27,  864,  875,  3,  876,  877;
  5851, 1755, 6144, 6875, 219, 6912, 7003, 27, 7008, 7019, 3, 7020, 7021;
  ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Boston, 2nd Ed., 12th printing, 2002, pp. 24-25.
  • P. Lancaster and M. Tismenetsky, The Theory of Matrices, Academic Press, Boston, 1985, p. 35.
  • J. P. Melo, Reversibility of John von Neumann cellular automata, M.Sc. Thesis, Division of Computer Science, Instituto Tecnológico de Aeronáutica, 1997 (in Portuguese), p. 18.

Crossrefs

Column k=1 gives A245599(n+1).
Column k=2 gives A083713.
Column k=3 gives A204623.
T(n,3n-1) gives A010701.
Cf. A038184 One-dimensional cellular automaton (Rule 150) in a tape with 3m cells has as adjacency matrix the Jacobi matrices, 3m X 3m, with 1s on the lower, main and upper diagonals and the operations on it are in GF(2). And A363146 for the inverse of Jacobi matrices 3m X 3m, with 1s on the lower, main, and upper diagonals in GF(2).

Programs

  • Maple
    T:= n-> (M-> seq(add(abs(M[j, n*3+1-i])*2^i, i=0..n*3), j=1..n*3+1))
                   (Matrix(n*3+1, (i, j)-> `if`(abs(i-j)<2, 1, 0))^(-1)):
    seq(T(n), n=1..6);  # Alois P. Heinz, May 20 2023
  • Mathematica
    sequence = {};
    For[k = 1, k <= 50, k++, {
      n = 3*k + 1;
      J = ConstantArray[0, {n, n}];
      For[i = 1, i < n, i++,
       J[[i, i]] = J[[i + 1, i]] = J[[i, i + 1]] = 1];
      J[[1, 1]] = J[[n, n]] = 1;
      InvJ = Mod[Inverse[J], 2];
      For[i = 1, i <= n, i++, AppendTo[sequence, FromDigits[InvJ[[i]], 2]]]
      }
     ]
    sequence
  • PARI
    row(n)=my(m=3*n+1, A=lift(matrix(m, m, i, j, Mod(abs(i-j)<=1, 2))^(-1))); vector(m, i, fromdigits(A[i,], 2)) \\ Andrew Howroyd, May 20 2023

Formula

The recurrence has as its base:
r(1, 1) = 11;
r(2, 1) = 3;
r(3, 1) = 12;
r(4, 1) = 13.
For 2 <= k <= m, and i = 1, 2, 3, ..., 3k - 2:
r(i, k) = 8*r(i, k-1) + r(2, 1) (i != 0 (mod 3)).
And r(3k-1, k) = r(2, 1);
r(3k, k) = 8*r(3(k-1), k-1) + r(3,1);
r(3k+1, k) = 8*r(3(k-1), k-1) + r(4,1).
Showing 1-8 of 8 results.