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

A353661 Inverse permutation to A353660.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, May 02 2022

Keywords

Examples

			A353660(7) = 5, so a(5) = 7.
		

Crossrefs

Cf. A353660.

Programs

  • PARI
    See Links section.

Formula

a(n) < 3^k iff n < 3^k.

A353662 The binary expansions of A352909(n+1, 1) and A352909(n+1, 2) encode respectively the 1's and the -1's in the balanced ternary expansion of a(n).

Original entry on oeis.org

0, -1, 1, -3, 3, -4, -2, 2, 4, -9, 9, -10, -8, 8, 10, -12, -6, 6, 12, -13, -11, -7, -5, 5, 7, 11, 13, -27, 27, -28, -26, 26, 28, -30, -24, 24, 30, -31, -29, -25, -23, 23, 25, 29, 31, -36, -18, 18, 36, -37, -35, -19, -17, 17, 19, 35, 37, -39, -33, -21, -15, 15
Offset: 0

Views

Author

Rémy Sigrist, May 02 2022

Keywords

Comments

This sequence is a permutation from the nonnegative integers onto the integers (Z).

Examples

			For n = 42:
- A352909(43, 1) = 9,
- A352909(43, 2) = 2,
- the binary expansion of 9 is "1001",
- the binary expansion of 2 is "10",
- so the balanced ternary expansion of a(42) is "10T1",
- and a(42) = 25.
		

Crossrefs

Programs

  • PARI
    b2t(n) = fromdigits(binary(n), 3)
    { n=-1; for (d=0, 2^8-1, for (k=0, d, if (bitand(t1=k, t2=d-k)==0, print1 (b2t(t1) - b2t(t2)", "); if (n++==61, break (2))))) }

Formula

a(n) = A005836(A352909(n+1, 1)) - A005836(A352909(n+1, 2)).
a(n) = A117966(A353660(n)).
Sum_{k = 0..n} a(k) = 0 iff n = 0 or n belongs to A074330.
Showing 1-2 of 2 results.