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

A268723 Main diagonal of A268725: a(n) = A003188(A006068(n)^2), where A003188 is binary Gray code and A006068 is its inverse.

Original entry on oeis.org

0, 1, 13, 6, 41, 54, 24, 21, 145, 166, 216, 253, 96, 121, 69, 86, 545, 582, 664, 749, 864, 841, 949, 1014, 384, 433, 477, 486, 793, 278, 344, 357, 2113, 2182, 2328, 2509, 2656, 2793, 2901, 2998, 3456, 3537, 3901, 3366, 3641, 3798, 4056, 3973, 1536, 1633, 1709, 1734, 1801, 1910, 1944, 2037, 3313, 3174, 1112, 1053
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Crossrefs

Main diagonal of array A268725.

Programs

Formula

a(n) = A003188(A000290(A006068(n))).

A341520 Square array A(n,k) = A156552(A005940(1+n)*A005940(1+k)), read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 5, 5, 3, 4, 7, 6, 7, 4, 5, 9, 11, 11, 9, 5, 6, 11, 10, 15, 10, 11, 6, 7, 13, 13, 19, 19, 13, 13, 7, 8, 15, 14, 23, 12, 23, 14, 15, 8, 9, 17, 23, 27, 21, 21, 27, 23, 17, 9, 10, 19, 18, 31, 22, 27, 22, 31, 18, 19, 10, 11, 21, 21, 35, 39, 29, 29, 39, 35, 21, 21, 11, 12, 23, 22, 39, 20, 47, 30, 47, 20, 39, 22, 23, 12
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2021

Keywords

Comments

The indices run as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc. The array is symmetric.
This array defines a binary operation on the nonnegative integers that matches up the zeros in the binary representation of each operand (starting from the right, and including as many leading zeros as necessary) and concatenates the two (possibly null) strings of ones to the right of each matched pair of zeros. See the examples. - Peter Munn, Feb 14 2021.
As such it could be useful for implementing multiplication, say, in Turing machines, with a "tape-like" unary-binary encoding of the prime factorization of n (A156552). However, such representation is not very useful if addition or subtraction is also needed.

Examples

			The top left {0..15} X {0..16} corner of the array:
   0,  1,  2,  3,  4,  5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,
   1,  3,  5,  7,  9, 11,  13,  15,  17,  19,  21,  23,  25,  27,  29,  31,
   2,  5,  6, 11, 10, 13,  14,  23,  18,  21,  22,  27,  26,  29,  30,  47,
   3,  7, 11, 15, 19, 23,  27,  31,  35,  39,  43,  47,  51,  55,  59,  63,
   4,  9, 10, 19, 12, 21,  22,  39,  20,  25,  26,  43,  28,  45,  46,  79,
   5, 11, 13, 23, 21, 27,  29,  47,  37,  43,  45,  55,  53,  59,  61,  95,
   6, 13, 14, 27, 22, 29,  30,  55,  38,  45,  46,  59,  54,  61,  62, 111,
   7, 15, 23, 31, 39, 47,  55,  63,  71,  79,  87,  95, 103, 111, 119, 127,
   8, 17, 18, 35, 20, 37,  38,  71,  24,  41,  42,  75,  44,  77,  78, 143,
   9, 19, 21, 39, 25, 43,  45,  79,  41,  51,  53,  87,  57,  91,  93, 159,
  10, 21, 22, 43, 26, 45,  46,  87,  42,  53,  54,  91,  58,  93,  94, 175,
  11, 23, 27, 47, 43, 55,  59,  95,  75,  87,  91, 111, 107, 119, 123, 191,
  12, 25, 26, 51, 28, 53,  54, 103,  44,  57,  58, 107,  60, 109, 110, 207,
  13, 27, 29, 55, 45, 59,  61, 111,  77,  91,  93, 119, 109, 123, 125, 223,
  14, 29, 30, 59, 46, 61,  62, 119,  78,  93,  94, 123, 110, 125, 126, 239,
  15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 239, 255,
  16, 33, 34, 67, 36, 69,  70, 135,  40,  73,  74, 139,  76, 141, 142, 271,
...
From _Peter Munn_, Feb 24 2021: (Start)
We consider the case of n = 10, k = 41, following the procedure in the Feb 14 2021 comment.
First, write 10 and 41 in binary:
  10 = 1010_2
  41 = 101001_2
Add at least one leading zero to each number, equalizing number of zeros:
  0  0  1  0  1  0
  0  1  0  1  0  0  1
Align zeros, but separate ones:
  0     0  1     0  1  0
  |     |        |     |
  0  1  0     1  0     0  1
---------------------------
  0  1  0  1  1  0  1  0  1
Concatenating the ones, as shown above, we get 10110101_2 = 181.
So A(10, 41) = 181.
(End)
		

Crossrefs

Cf. A088698 (main diagonal).
Rows/columns 0-3: A001477, A005408, A341522, A004767. Row/column 7: A004771.
Cf. A341521 (the lower triangular section).

Programs

  • Mathematica
    Block[{nn = 12, a = {1}}, Do[AppendTo[a, If[EvenQ[i], Times @@ Map[Prime[PrimePi[#1] + 1]^#2 & @@ # &, FactorInteger[#]] &@ a[[(i/2) + 1]], 2 a[[((i - 1)/2) + 1]]]], {i, nn}]; Table[Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]] &[a[[1 + n - k]]*a[[1 + k]] ], {n, 0, nn}, {k, n, 0, -1}]] // Flatten (* Michael De Vlieger, Feb 24 2021 *)
  • PARI
    up_to = 105;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A341520sq(n,k) = A156552(A005940(1+n)*A005940(1+k));
    A341520list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0,oo, for(col=0,a, i++; if(i > #v, return(v)); v[i] = A341520sq(col,(a-(col))))); (v); };
    v341520 = A341520list(up_to);
    A341520(n) = v341520[1+n];

Formula

A(x, y) = A156552(A005940(1+x) * A005940(1+y)).
For all n>=0, A(0, n) = A(n, 0) = n.
For all x>=0, y>=0, A(x, y) = A(y, x).
For all x, y, z >= 0, A(x, A(y, z)) = A(A(x, y), z).
From Antti Karttunen, Feb 27 2022: (Start)
For all x, y >= 0, A(x, y) = A(A351961(x,y), A351962(x,y)).
For x >= 0, y > 0, A(x, y) = A351960(x, A(x, A297164(y))).
(End)

A268715 Square array A(i,j) = A003188(A006068(i) + A006068(j)), read by antidiagonals 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, 1, 1, 2, 3, 2, 3, 6, 6, 3, 4, 2, 5, 2, 4, 5, 12, 7, 7, 12, 5, 6, 4, 15, 6, 15, 4, 6, 7, 7, 13, 13, 13, 13, 7, 7, 8, 5, 4, 12, 9, 12, 4, 5, 8, 9, 24, 12, 5, 11, 11, 5, 12, 24, 9, 10, 8, 27, 4, 14, 10, 14, 4, 27, 8, 10, 11, 11, 25, 25, 10, 15, 15, 10, 25, 25, 11, 11, 12, 9, 8, 24, 29, 14, 12, 14, 29, 24, 8, 9, 12, 13, 13, 24, 9, 31, 31, 13, 13, 31, 31, 9, 24, 13, 13
Offset: 0

Views

Author

Antti Karttunen, Feb 12 2016

Keywords

Comments

Each row n is row A006068(n) of array A268820 without its A006068(n) initial terms.

Examples

			The top left [0 .. 15] x [0 .. 15] section of the array:
   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15
   1,  3,  6,  2, 12,  4,  7,  5, 24,  8, 11,  9, 13, 15, 10, 14
   2,  6,  5,  7, 15, 13,  4, 12, 27, 25,  8, 24, 14, 10,  9, 11
   3,  2,  7,  6, 13, 12,  5,  4, 25, 24,  9,  8, 15, 14, 11, 10
   4, 12, 15, 13,  9, 11, 14, 10, 29, 31, 26, 30,  8, 24, 27, 25
   5,  4, 13, 12, 11, 10, 15, 14, 31, 30, 27, 26,  9,  8, 25, 24
   6,  7,  4,  5, 14, 15, 12, 13, 26, 27, 24, 25, 10, 11,  8,  9
   7,  5, 12,  4, 10, 14, 13, 15, 30, 26, 25, 27, 11,  9, 24,  8
   8, 24, 27, 25, 29, 31, 26, 30, 17, 19, 22, 18, 28, 20, 23, 21
   9,  8, 25, 24, 31, 30, 27, 26, 19, 18, 23, 22, 29, 28, 21, 20
  10, 11,  8,  9, 26, 27, 24, 25, 22, 23, 20, 21, 30, 31, 28, 29
  11,  9, 24,  8, 30, 26, 25, 27, 18, 22, 21, 23, 31, 29, 20, 28
  12, 13, 14, 15,  8,  9, 10, 11, 28, 29, 30, 31, 24, 25, 26, 27
  13, 15, 10, 14, 24,  8, 11,  9, 20, 28, 31, 29, 25, 27, 30, 26
  14, 10,  9, 11, 27, 25,  8, 24, 23, 21, 28, 20, 26, 30, 29, 31
  15, 14, 11, 10, 25, 24,  9,  8, 21, 20, 29, 28, 27, 26, 31, 30
		

Crossrefs

Main diagonal: A001969.
Row 0, column 0: A001477.
Row 1, column 1: A268717.
Antidiagonal sums: A268837.
Cf. A268719 (the lower triangular section).
Cf. also A268725.

Programs

Formula

A(i,j) = A003188(A006068(i) + A006068(j)) = A003188(A268714(i,j)).
A(row,col) = A268820(A006068(row), (A006068(row)+col)).

A268724 Square array A(i,j) = A006068(i) * A006068(j), read by antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 3, 3, 2, 9, 2, 7, 6, 6, 7, 6, 21, 4, 21, 6, 4, 18, 14, 14, 18, 4, 5, 12, 12, 49, 12, 12, 5, 15, 15, 8, 42, 42, 8, 15, 15, 14, 45, 10, 28, 36, 28, 10, 45, 14, 12, 42, 30, 35, 24, 24, 35, 30, 42, 12, 13, 36, 28, 105, 30, 16, 30, 105, 28, 36, 13, 8, 39, 24, 98, 90, 20, 20, 90, 98, 24, 39, 8, 9, 24, 26, 84, 84, 60, 25, 60, 84, 84, 26, 24, 9
Offset: 1

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Examples

			The top left [1 .. 15] x [1 .. 15] section of the array:
   1,  3,  2,  7,   6,  4,  5,  15,  14,  12,  13,   8,   9,  11,  10
   3,  9,  6,  21, 18, 12, 15,  45,  42,  36,  39,  24,  27,  33,  30
   2,  6,  4,  14, 12,  8, 10,  30,  28,  24,  26,  16,  18,  22,  20
   7, 21, 14,  49, 42, 28, 35, 105,  98,  84,  91,  56,  63,  77,  70
   6, 18, 12,  42, 36, 24, 30,  90,  84,  72,  78,  48,  54,  66,  60
   4, 12,  8,  28, 24, 16, 20,  60,  56,  48,  52,  32,  36,  44,  40
   5, 15, 10,  35, 30, 20, 25,  75,  70,  60,  65,  40,  45,  55,  50
  15, 45, 30, 105, 90, 60, 75, 225, 210, 180, 195, 120, 135, 165, 150
  14, 42, 28,  98, 84, 56, 70, 210, 196, 168, 182, 112, 126, 154, 140
  12, 36, 24,  84, 72, 48, 60, 180, 168, 144, 156,  96, 108, 132, 120
  13, 39, 26,  91, 78, 52, 65, 195, 182, 156, 169, 104, 117, 143, 130
   8, 24, 16,  56, 48, 32, 40, 120, 112,  96, 104,  64,  72,  88,  80
   9, 27, 18,  63, 54, 36, 45, 135, 126, 108, 117,  72,  81,  99,  90
  11, 33, 22,  77, 66, 44, 55, 165, 154, 132, 143,  88,  99, 121, 110
  10, 30, 20,  70, 60, 40, 50, 150, 140, 120, 130,  80,  90, 110, 100
		

Crossrefs

Cf. A268725.
Cf. A006068 (row 1, column 1).
Cf. A268716 (row 3, column 3).
Cf. A268721 (the antidiagonal sums).
Cf. also A268714.

Programs

Formula

A(i,j) = A006068(i) * A006068(j)
A(i,j) = A006068(A268725(i,j)).

A268722 a(n) = A003188(3*A006068(n)), where A003188 is binary Gray code and A006068 is its inverse.

Original entry on oeis.org

0, 2, 13, 5, 31, 27, 10, 8, 59, 63, 54, 52, 20, 22, 49, 17, 115, 119, 126, 124, 108, 110, 121, 105, 40, 42, 37, 45, 103, 99, 34, 32, 227, 231, 238, 236, 252, 254, 233, 249, 216, 218, 213, 221, 247, 243, 210, 208, 80, 82, 93, 85, 79, 75, 90, 88, 203, 207, 198, 196, 68, 70, 193, 65
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2016

Keywords

Crossrefs

Row 2 and column 2 of array A268725.

Programs

Formula

a(n) = A003188(3*A006068(n)).
Showing 1-5 of 5 results.