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

A054238 Array read by downward antidiagonals: T(i,j) = bits of binary expansion of i interleaved with that of j.

Original entry on oeis.org

0, 1, 2, 4, 3, 8, 5, 6, 9, 10, 16, 7, 12, 11, 32, 17, 18, 13, 14, 33, 34, 20, 19, 24, 15, 36, 35, 40, 21, 22, 25, 26, 37, 38, 41, 42, 64, 23, 28, 27, 48, 39, 44, 43, 128, 65, 66, 29, 30, 49, 50, 45, 46, 129, 130, 68, 67, 72, 31, 52, 51, 56, 47, 132, 131, 136, 69, 70, 73, 74
Offset: 0

Views

Author

Marc LeBrun, Feb 07 2000

Keywords

Comments

Inverse of sequence A054239 considered as a permutation of the nonnegative integers.
Permutation of nonnegative integers. Can be used as natural alternate number casting for pairs/tables (vs. usual diagonalization).
This array is a Z-order curve in an N x N grid. - Max Barrentine, Sep 24 2015
Each row n of this array is the lexicographically earliest sequence such that no term occurs in a previous row, no three terms form an arithmetic progression, and the k-th term in the n-th row is equal to the k-th term in row 0 plus some constant (specifically, T(n,k) = T(0,k) + A062880(n)). - Max Barrentine, Jul 20 2016

Examples

			From _Philippe Deléham_, Oct 18 2011: (Start)
The array starts in row n=0 with columns k >= 0 as follows:
   0  1  4  5 16 17 20 21 ...
   2  3  6  7 18 19 22 23 ...
   8  9 12 13 24 25 28 29 ...
  10 11 14 15 26 27 30 31 ...
  32 33 36 37 48 49 52 53 ...
  34 35 38 39 50 51 54 55 ...
  40 41 44 45 56 57 60 61 ...
  42 43 46 47 58 59 62 63 ...
(End)
T(6,5)=57 because 1.1.0. (6) merged with .1.0.1 (5) is 111001 (57). [Corrected by _Georg Fischer_, Jan 21 2022]
		

Crossrefs

Cf. A000695 (row n=0), A062880 (column k=0), A001196 (main diagonal).
Cf. A059905, A059906, A346453 (by upwards antidiagonals).
See also A163357 and A163334 for other fractal curves in N x N grids.

Programs

  • Maple
    N:= 4: # to get the first 2^(2N+1)+2^N terms
    G:= 1/(1-y)/(1-x)*(add(2^(2*i+1)*x^(2^i)/(1+x^(2^i)),i=0..N) + add(2^(2*i)*y^(2^i)/(1+y^(2^i)),i=0..N)):
    S:= mtaylor(G,[x=0,y=0],2^(N+1)):
    seq(seq(coeff(coeff(S,x,i),y,m-i),i=0..m),m=0..2^(N+1)-1); # Robert Israel, Jul 21 2016
  • Mathematica
    Table[Total@ Map[FromDigits[#, 2] &, Insert[#, 0, {-1, -1}] &@ Map[Riffle[IntegerDigits[#, 2], 0, 2] &, {n - k, k}]], {n, 0, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 21 2016 *)

Formula

T(n,k) = A000695(k) + 2*A000695(n). - Philippe Deléham, Oct 18 2011
From Robert Israel, Jul 21 2016: (Start)
G.f. of array: g(x,y) = (1/(1-x)*(1-y)) * Sum_{i>=0}
(2^(2*i+1)*x^(2^i)/(1+x^(2^i)) + 2^(2*i)*y^(2^i)/(1+y^(2^i))).
T(2*n+i,2*k+j) = 4*T(n,k) + 2*i+j for i,j in {0,1}. (End)

A163358 Inverse permutation to A163357.

Original entry on oeis.org

0, 1, 4, 2, 5, 9, 13, 8, 12, 18, 24, 17, 11, 7, 3, 6, 10, 16, 22, 15, 21, 28, 37, 29, 38, 47, 58, 48, 39, 30, 23, 31, 40, 50, 60, 49, 59, 70, 83, 71, 84, 97, 112, 98, 85, 72, 61, 73, 62, 52, 42, 51, 41, 32, 25, 33, 26, 19, 14, 20, 27, 34, 43, 35, 44, 54, 64, 53, 63, 74, 87
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Comments

abs(A025581(a(n+1)) - A025581(a(n))) + abs(A002262(a(n+1)) - A002262(a(n))) = 1 for all n.

Crossrefs

Inverse: A163357. a(n) = A054239(A163356(n)). One-based version: A163362. See also A163334 and A163336.

A163329 Inverse permutation to A163328.

Original entry on oeis.org

0, 1, 3, 2, 4, 7, 5, 8, 12, 6, 10, 15, 11, 16, 22, 17, 23, 30, 21, 28, 36, 29, 37, 46, 38, 47, 57, 9, 13, 18, 14, 19, 25, 20, 26, 33, 24, 31, 39, 32, 40, 49, 41, 50, 60, 48, 58, 69, 59, 70, 82, 71, 83, 96, 27, 34, 42, 35, 43, 52, 44, 53, 63, 51, 61, 72, 62, 73, 85, 74, 86, 99
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Crossrefs

Inverse: A163328. a(n) = A163331(A163327(n)). A054239 is an analogous sequence for binary. Cf. A007089.

Programs

Formula

a(n) = A001477bi(A163325(n),A163326(n)), where A001477bi(x,y) = (((x+y)^2)+x+(3y))/2.

A054240 Bit-interleaved number addition table; like binary addition but carries shift 2 instead of 1; addition base sqrt(2).

Original entry on oeis.org

0, 1, 1, 2, 4, 2, 3, 3, 3, 3, 4, 6, 8, 6, 4, 5, 5, 9, 9, 5, 5, 6, 16, 6, 12, 6, 16, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 18, 12, 18, 16, 18, 12, 18, 8, 9, 9, 13, 13, 17, 17, 13, 13, 9, 9, 10, 12, 10, 24, 18, 20, 18, 24, 10, 12, 10, 11, 11, 11, 11, 19, 19, 19, 19, 11, 11, 11, 11, 12, 14, 32, 14
Offset: 0

Views

Author

Marc LeBrun, Feb 07 2000

Keywords

Examples

			T(3,1)=6 because (0*2 + 1*sqrt(2) + 1*1) + (0*2 + 0*sqrt(2) + 1*1) = (1*2 + 1*sqrt(2) + 0*1) (i.e., base sqrt(2) addition).
		

Crossrefs

Cf. A000695, A054239, A057300, A062880, A352909 (pairs (i,j) such that A(i,j) = i+j).
Cf. A201651 (triangle read by rows).

Programs

  • Haskell
    import Data.Bits (xor, (.&.), shift)
    a054240 :: Integer -> Integer -> Integer
    a054240 x 0 = x
    a054240 x y = a054240 (x `xor` y) (shift (x .&. y) 2)
    a054240_adiag n =  map (\k -> a054240 (n - k) k) [0..n]
    a054240_square = map a054240_adiag [0..]
    -- Reinhard Zumkeller, Dec 03 2011

Formula

From Peter Munn, Dec 10 2019: (Start)
A(m,0) = A(0,m) = m.
A(n,k) = A(k,n).
A(n, A(m,k)) = A(A(n,m), k).
A(m,m) = 4*m.
A(2*n, 2*k) = 2*A(n,k).
A(A000695(n), A000695(k)) = A000695(n+k).
A(A000695(n), 2*A000695(k)) = A000695(n) + 2*A000695(k).
A(A000695(n) + 2*A000695(m), k) = A(A000695(n), k) + A(2*A000695(m), k) - k.
A(A057300(n), A057300(k)) = A057300(A(n,k)).
(End)

A163546 Inverse permutation to A163545.

Original entry on oeis.org

0, 2, 4, 1, 13, 9, 5, 8, 12, 18, 24, 17, 11, 7, 3, 6, 62, 51, 42, 52, 43, 35, 27, 34, 26, 19, 14, 20, 41, 33, 25, 32, 40, 50, 60, 49, 85, 73, 61, 72, 84, 98, 112, 97, 83, 71, 59, 70, 58, 47, 38, 48, 39, 31, 23, 30, 22, 15, 10, 16, 37, 29, 21, 28, 268, 245, 224, 246, 183
Offset: 0

Views

Author

Antti Karttunen, Aug 01 2009

Keywords

Crossrefs

Inverse: A163545. a(n) = A054239(A163486(n)) = A061579(A163544(n)).

A163908 Inverse permutation to A163907.

Original entry on oeis.org

0, 1, 2, 4, 12, 24, 17, 18, 11, 3, 6, 7, 8, 13, 5, 9, 10, 22, 15, 16, 21, 28, 29, 37, 39, 30, 31, 23, 48, 47, 38, 58, 62, 42, 51, 52, 41, 32, 33, 25, 27, 34, 35, 43, 20, 19, 26, 14, 73, 61, 85, 72, 71, 70, 59, 83, 49, 50, 40, 60, 84, 97, 98, 112, 144, 180, 161, 162, 179
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Crossrefs

Inverse: A163907. a(n) = A054239(A163906(n)) = A163358(A163356(n)). See also A163358, A163918.

A163918 Inverse permutation to A163917.

Original entry on oeis.org

0, 1, 4, 2, 11, 6, 7, 3, 8, 5, 9, 13, 18, 17, 12, 24, 10, 15, 16, 22, 21, 28, 37, 29, 48, 47, 58, 38, 23, 30, 39, 31, 73, 85, 72, 61, 71, 70, 83, 59, 84, 97, 112, 98, 60, 50, 49, 40, 14, 26, 20, 19, 25, 32, 41, 33, 52, 42, 62, 51, 27, 34, 43, 35, 260, 237, 238, 216, 215
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Crossrefs

Inverse: A163917. a(n) = A054239(A163916(n)) = A163908(A163356(n)). See also A163358, A163908.

A072794 Inverse permutation to A072793.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 10, 8, 9, 12, 11, 14, 15, 16, 21, 13, 23, 17, 18, 36, 19, 20, 25, 22, 27, 28, 29, 40, 30, 31, 38, 24, 44, 45, 46, 55, 26, 57, 32, 33, 78, 34, 35, 42, 37, 82, 49, 50, 59, 39, 61, 47, 48, 136, 53, 54, 63, 56, 65, 66, 67, 86, 68, 69, 80, 41, 90, 91, 92
Offset: 0

Views

Author

Antti Karttunen, Jun 12 2002

Keywords

Crossrefs

Composition of A054239 & A048679.

A054241 Number of partitions of bit-interleaved numbers; partitions of n in base sqrt(2).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 7, 2, 4, 3, 7, 9, 16, 16, 31, 5, 7, 12, 19, 11, 15, 30, 45, 29, 47, 57, 97, 77, 118, 162, 257, 5, 12, 7, 19, 29, 57, 47, 97, 11, 30, 15, 45, 77, 162, 118, 257, 109, 189, 189, 339, 323, 522, 589, 975, 323, 589, 522, 975, 1043, 1752, 1752
Offset: 0

Views

Author

Marc LeBrun, Feb 07 2000

Keywords

Comments

Rearrangement of A054225 via A054238. Also can be directly derived from A054240 (bit-interleaved addition table).

Examples

			a(6)=4 thus: {6, 4+2, 3+1, 2+1+1} all in base sqrt(2).
From _Sean A. Irvine_, Jan 26 2022: (Start)
a(12)=9 from {12, 9+1, 8+4, 8+1+1, 6+2, 4+2+2, 3+3, 3+2+1, 2+2+1+1}.
a(13)=16 from {13, 12+1, 9+4, 9+1+1, 8+5, 8+4+1, 8+1+1+1, 7+2, 6+3, 6+2+1, 5+2+2, 4+3+2, 4+2+2+1, 3+3+1, 3+2+1+1, 2+2+1+1+1}.
(End)
		

Crossrefs

Formula

a(n) = A054225(A054239(n)). - Sean A. Irvine, Jan 26 2022

Extensions

Data corrected by Sean A. Irvine, Jan 26 2022
Showing 1-9 of 9 results.