Skip to main content
edited body
Source Link
xash
  • 11.3k
  • 1
  • 14
  • 39

J, 21 19 bytes

Found Bubbler's solution. :-)

2(*+/])4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 42 into base 24. So that's helpful with J:

2(*+/])4#.2#:@i.@^]
          2   i.@^]  0 1 … 2^n
           #:        digits in base 2
                      0 0 0
                      0 0 1
                          …
                      1 1 0
                      1 1 1
       4#.           interpret as digits in base 4
                      0 1 4 5 16 17 20 21
2(*+/])              addition table of list*2 with list

J, 21 19 bytes

Found Bubbler's solution. :-)

2(*+/])4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 4 into base 2. So that's helpful with J:

2(*+/])4#.2#:@i.@^]
          2   i.@^]  0 1 … 2^n
           #:        digits in base 2
                      0 0 0
                      0 0 1
                          …
                      1 1 0
                      1 1 1
       4#.           interpret as digits in base 4
                      0 1 4 5 16 17 20 21
2(*+/])              addition table of list*2 with list

J, 21 19 bytes

Found Bubbler's solution. :-)

2(*+/])4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 2 into base 4. So that's helpful with J:

2(*+/])4#.2#:@i.@^]
          2   i.@^]  0 1 … 2^n
           #:        digits in base 2
                      0 0 0
                      0 0 1
                          …
                      1 1 0
                      1 1 1
       4#.           interpret as digits in base 4
                      0 1 4 5 16 17 20 21
2(*+/])              addition table of list*2 with list
deleted 20 characters in body
Source Link
xash
  • 11.3k
  • 1
  • 14
  • 39

J, 21 19 bytes

Found Bubbler's solution. :-)

2(*+/])4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 4 into base 2. So that's helpful with J:

[:2(+*+/~+:])4#.2#:@i.@^]
            2   i.@^]  0 1 … 2^n
             #:        digits in base 2
                        0 0 0
                        0 0 1
                          1 1 0
                        1 1 1
         4#.           interpret as digits in base 4
                        0 1 4 5 16 17 20 21
[:2(+*+/~+:])              addition table of rowlist*2 with row*2list

J, 21 19 bytes

Found Bubbler's solution. :-)

2(*+/])4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 4 into base 2. So that's helpful with J:

[:(+/~+:)4#.2#:@i.@^]
            2   i.@^]  0 1 … 2^n
             #:        digits in base 2
                        0 0 0
                        0 0 1
                          1 1 0
                        1 1 1
         4#.           interpret as digits in base 4
                        0 1 4 5 16 17 20 21
[:(+/~+:)              addition table of row with row*2

J, 21 19 bytes

Found Bubbler's solution. :-)

2(*+/])4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 4 into base 2. So that's helpful with J:

2(*+/])4#.2#:@i.@^]
          2   i.@^]  0 1 … 2^n
           #:        digits in base 2
                      0 0 0
                      0 0 1
                          …
                      1 1 0
                      1 1 1
       4#.           interpret as digits in base 4
                      0 1 4 5 16 17 20 21
2(*+/])              addition table of list*2 with list
added 224 characters in body
Source Link
xash
  • 11.3k
  • 1
  • 14
  • 39

J, 2121 19 bytes

Still missing two bytes, but maybe this wasn't evenFound Bubbler's approachsolution. :-)

[:2(+*+/~+:])4#.2#:@i.@^]

Try it online!Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 4 into base 2. So that's helpful with J:

[:(+/~+:)4#.2#:@i.@^]
            2   i.@^]  0 1 … 2^n
             #:        digits in base 2
                        0 0 0
                        0 0 1
                            …
                        1 1 0
                        1 1 1
         4#.           interpret as digits in base 4
                        0 1 4 5 16 17 20 21
[:(+/~+:)              addition table of row with row*2

J, 21 bytes

Still missing two bytes, but maybe this wasn't even Bubbler's approach.

[:(+/~+:)4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 4 into base 2. So that's helpful with J:

[:(+/~+:)4#.2#:@i.@^]
            2   i.@^]  0 1 … 2^n
             #:        digits in base 2
         4#.           interpret as digits in base 4
[:(+/~+:)              addition table of row with row*2

J, 21 19 bytes

Found Bubbler's solution. :-)

2(*+/])4#.2#:@i.@^]

Try it online!

The first row is A000695, the first column is the same but times two. In the comments Marc LeBrun notes that this is rebasing n from base 4 into base 2. So that's helpful with J:

[:(+/~+:)4#.2#:@i.@^]
            2   i.@^]  0 1 … 2^n
             #:        digits in base 2
                        0 0 0
                        0 0 1
                            …
                        1 1 0
                        1 1 1
         4#.           interpret as digits in base 4
                        0 1 4 5 16 17 20 21
[:(+/~+:)              addition table of row with row*2
Source Link
xash
  • 11.3k
  • 1
  • 14
  • 39
Loading