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

A361832 For any number k >= 0, let T_k be the triangle whose base corresponds to the ternary expansion of k (without leading zeros) and other values, say t above u and v, satisfy t = (-u-v) mod 3; the ternary expansion of a(n) corresponds to the left border of T_n (the most significant digit being at the bottom left corner).

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 26 2023

Keywords

Comments

This sequence is a variant of A334727.
This sequence is a self-inverse permutation of the nonnegative integers that preserves the number of digits and the leading digit in base 3.

Examples

			For n = 42: the ternary expansion of 42 is "1120" and the corresponding triangle is as follows:
       2
      2 2
     1 0 1
    1 1 2 0
So the ternary expansion of a(42) is "1122", and a(42) = 44.
		

Crossrefs

Cf. A004488, A048328, A334727, A361818, A361833 (fixed points).

Programs

  • PARI
    a(n) = { my (d = digits(n, 3), t = vector(#d)); for (k = 1, #d, t[k] = d[1]; d = vector(#d-1, i, (-d[i]-d[i+1]) % 3);); fromdigits(t, 3); }

Formula

a(floor(n/3)) = floor(a(n)/3).
a(A004488(n)) = A004488(a(n)).
a(n) = n for any n in A048328.
a(n) = n iff b belongs to A361833.

A335133 Binary interpretation of the left diagonal of the EQ-triangle with first row generated from the binary expansion of n, with most significant bit given by first row.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, May 24 2020

Keywords

Comments

For any nonnegative number n, the EQ-triangle for n is built by taking as first row the binary expansion of n (without leading zeros), having each entry in the subsequent rows be the EQ of the two values above it (a "1" indicates that these two values are equal, a "0" indicates that these values are different).
This sequence is a self-inverse permutation of the nonnegative numbers.

Examples

			For n = 42:
- the binary representation of 42 is "101010",
- the corresponding EQ-triangle is:
         1 0 1 0 1 0
          0 0 0 0 0
           1 1 1 1
            1 1 1
             1 1
              1
- the bits on the left diagonal are: 1, 0, 1, 1, 1, 1,
- so a(42) = 2^5 + 2^3 + 2^2 + 2^1 + 2^0 = 47.
		

Crossrefs

Cf. A055010, A070939, A279645, A334727 (XOR variant).

Programs

  • PARI
    a(n) = {
        my (b=binary(n), v=0);
        forstep (x=#b-1, 0, -1,
            if (b[1], v+=2^x);
            b=vector(#b-1, k, b[k]==b[k+1])
        );
        return (v)
    }

Formula

a(floor(n/2)) = floor(a(n)/2).
abs(a(2*n+1) - a(2*n)) = 1.
a(2^k) = 2^k for any k >= 0.
a(2^k+1) = 2^k+1 for any k >= 0.
a(2^k-1) = 2^k-1 for any k >= 0.
Apparently, a(n) + A334727(n) = A055010(A070939(n)) for any n > 0.

A371635 For any number k >= 0, let T_k be the triangle with values in {-1, 0, +1} whose base corresponds to the balanced ternary expansion of k (without leading zeros) and other values, say t above u and v, satisfy t+u+v = 0 mod 3; the balanced ternary expansion of a(n) corresponds to the left border of T_n (the most significant digit being at the bottom left corner).

Original entry on oeis.org

0, 1, 3, 2, 4, 10, 8, 9, 6, 7, 5, 11, 12, 13, 30, 29, 31, 24, 23, 25, 27, 26, 28, 18, 17, 19, 21, 20, 22, 15, 14, 16, 33, 32, 34, 36, 35, 37, 39, 38, 40, 91, 89, 90, 86, 87, 88, 93, 94, 92, 73, 71, 72, 68, 69, 70, 75, 76, 74, 82, 80, 81, 77, 78, 79, 84, 85, 83
Offset: 0

Views

Author

Rémy Sigrist, Mar 30 2024

Keywords

Comments

This sequence is a variant of A334727 and A361832.
This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			For n = 42: the balanced ternary expansion of 42 is "1TTT0" (where T denotes -1), and T_42 is as follows:
         T
        0 1
       1 T 0
      0 T T 1
     1 T T T 0
So the balanced ternary expansion of a(42) is "1010T", and a(42) = 89.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (b = [], d); while (n, b = concat(d = Mod(n, 3), b); n = (n-centerlift(d)) / 3;); my (t = vector(#b)); for (i = 1, #t, t[i] = centerlift(b[1]); b = -vector(#b-1, j, b[j]+b[j+1]);); fromdigits(t, 3); }

A334918 Numbers whose XOR-triangles have reflection symmetry.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 15, 16, 17, 21, 22, 24, 27, 30, 31, 32, 33, 40, 45, 51, 54, 62, 63, 64, 65, 72, 73, 85, 86, 93, 94, 96, 99, 104, 107, 118, 119, 126, 127, 128, 129, 153, 158, 165, 168, 182, 189, 195, 200, 214, 219, 224, 231, 254, 255, 256, 257
Offset: 1

Views

Author

Rémy Sigrist, May 16 2020

Keywords

Comments

There are three possible axes of symmetry:
.
. V
. U W
. .___._____.
. \ . . /
. \ . /
. . .
. . \ . / .
. W \ / U
. .
.
. V
.
- symmetry through axis U-U is only possible for the numbers 0 and 1,
- symmetry through axis V-V corresponds to binary palindromes,
- symmetry through axis W-W corresponds to number k such that A334727(k) is a binary palindrome,
- 0 and 1 are the only terms whose XOR-triangles have the three symmetries,
- XOR-triangles of other terms have only one kind of symmetry.

Examples

			The XOR-triangles for a(15) = 21 and a(16) = 22 are as follows (with dots instead of 0's for clarity):
                      1 . 1 . 1      1 . 1 1 .
                       1 1 1 1        1 1 . 1
                        . . .          . 1 1
                         . .            1 .
                          .              1
		

Crossrefs

Cf. A006995, A334556 (rotational symmetry), A334727.

Programs

  • PARI
    is(n) = { my (b=binary(n)); if (b==Vecrev(b), return (1), my (w=#b-1, x=n); for (k=0, w, if (bittest(n,k)!=bittest(x,0), return (0)); x=bitxor(x,x\2)); return (1)) }

A363038 The decimal digits of a(n) correspond to the Gilbreath transform of the decimal digits of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 11, 12, 13, 14, 15, 16, 17, 18, 22, 21, 20, 21, 22, 23, 24, 25, 26, 27, 33, 32, 31, 30, 31, 32, 33, 34, 35, 36, 44, 43, 42, 41, 40, 41, 42, 43, 44, 45, 55, 54, 53, 52, 51, 50, 51, 52, 53, 54, 66, 65, 64, 63, 62, 61, 60, 61
Offset: 0

Views

Author

Rémy Sigrist, May 14 2023

Keywords

Comments

Leading zeros are ignored.
This sequence preserves the number of digits (A055642) as well as the initial digit (A000030).

Examples

			For n = 1029: the Gilbreath transform of (1 0 2 9) is (1 1 1 4), so a(1029) = 1114.
		

Crossrefs

Cf. A000030, A055642, A334727 (base-2 analog).

Programs

  • Mathematica
    A363038[n_]:=Module[{d=IntegerDigits[n]},FromDigits[Join[{First[d]},Table[First[d=Abs[Differences[d]]],Length[d]-1]]]];Array[A363038,200,0] (* Paolo Xausa, May 19 2023 *)
  • PARI
    a(n, base = 10) = { my (d = digits(n, base), t = vector(#d)); for (i = 1, #d, t[i] = d[1]; d = vector(#d-1, j, abs(d[j+1]-d[j]));); fromdigits(t, base); }

A335049 The prime factorization of a(n) corresponds to the left diagonal of the XOR-triangle built from prime factorization of n, with 2-adic valuation of a(n) given by last row.

Original entry on oeis.org

1, 2, 6, 4, 30, 3, 210, 8, 36, 15, 2310, 24, 30030, 105, 10, 16, 510510, 72, 9699690, 120, 35, 1155, 223092870, 12, 900, 15015, 216, 840, 6469693230, 5, 200560490130, 32, 770, 255255, 21, 9, 7420738134810, 4849845, 5005, 60, 304250263527210, 70
Offset: 1

Views

Author

Rémy Sigrist, May 21 2020

Keywords

Comments

This sequence is a self-inverse permutation of the natural numbers.
This sequence has strong connections with A334727.

Examples

			For n = 198:
- 198 = 11^1 * 7^0 * 5^0 * 3^2 * 2^1,
- the corresponding XOR-triangle is:
         1 0 0 2 1
          1 0 2 3
           1 2 1
            3 3
             0
- so a(n) = 11^1 * 7^1 * 5^1 * 3^3 * 2^0 = 10395.
		

Crossrefs

Programs

  • PARI
    a(n) = {
        my (f=factor(n),
            m=if (#f~==0, 0, primepi(f[#f~, 1])),
            x=vector(m, k, valuation(n, prime(m+1-k))),
            v=1);
        forstep (i=m, 1, -1,
            v*=prime(i)^x[1];
            x=vector(#x-1, k, bitxor(x[k], x[k+1]));
        );
        v
    }

Formula

a(n) = n iff n is a power of 2.
a(n^2) = a(n)^2.
a(A019565(n)) = A019565(A334727(n)).
A006530(a(n)) = A006530(n).
A071178(a(n)) = A071178(n).
Showing 1-6 of 6 results.