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.

Previous Showing 11-13 of 13 results.

A089279 a(n) = 2 + sum(k=1 to n) [(-1)^k A001511(k)].

Original entry on oeis.org

1, 3, 2, 5, 4, 6, 5, 9, 8, 10, 9, 12, 11, 13, 12, 17, 16, 18, 17, 20, 19, 21, 20, 24, 23, 25, 24, 27, 26, 28, 27, 33, 32, 34, 33, 36, 35, 37, 36, 40, 39, 41, 40, 43, 42, 44, 43, 48, 47, 49, 48, 51, 50, 52, 51, 55, 54, 56, 55, 58, 57, 59, 58, 65, 64, 66, 65, 68, 67, 69, 68, 72
Offset: 1

Views

Author

Gary W. Adamson, Oct 28 2003

Keywords

Comments

a(2^n) = 2^n+1.

Crossrefs

Formula

a(2n+1) = A101925(n), a(2n+2) = a(2n+3)+1. - Ralf Stephan, Dec 28 2004

Extensions

Edited by Don Reble, Nov 15 2005

A240988 Denominators of the (reduced) rationals (((n-1)!!)/(n!! * 2^((1 + (-1)^n)/2)))^((-1)^n), where n is a positive integer.

Original entry on oeis.org

1, 4, 2, 16, 8, 32, 16, 256, 128, 512, 256, 2048, 1024, 4096, 2048, 65536, 32768, 131072, 65536, 524288, 262144, 1048576, 524288, 8388608, 4194304, 16777216, 8388608, 67108864, 33554432, 134217728, 67108864, 4294967296, 2147483648, 8589934592, 4294967296
Offset: 1

Views

Author

James Burling, Aug 06 2014

Keywords

Comments

Numerators for this sequence are the swinging factorial A163590, starting from n = 1.
The terms are all powers of 2 (A000079).
It appears that a(2*n) = 2^A101925(n) and a(2*n+1) = 2^A005187(n). - Robert Israel, Aug 06 2014

Examples

			For n = 1, a(1) = 1.
For n = 2, a(2) = 2 * 2 = 4.
For n = 6, a(6) = 2 * 2 * 4 * 2 = 32.
		

Crossrefs

Cf. A163590 (numerators).

Programs

  • Maple
    f:= n -> denom(((doublefactorial(n-1)) / (doublefactorial(n)*2^((1+(-1)^n)/2)))^((-1)^n)):
    seq(f(n), n=1..100); # Robert Israel, Aug 06 2014
  • PARI
    df(n) = prod(i=0, floor((n-1)/2), n-2*i) \\ Double factorial (n!!)
    a(n) = denominator(((df(n-1)) / (df(n)*2^((1+(-1)^n)/2)))^((-1)^n))
    vector(50, n, a(n)) \\ Colin Barker, Aug 06 2014

Formula

a(n) = denominator((((n-1)!!)/(n!! * 2^((1 + (-1)^n)/2)))^((-1)^n)).
a(n) = denominator(g(1, n)) where g(m, n) = m if m = n; m/(2 * g(m + 1, n)) otherwise.

Extensions

More terms from Colin Barker, Aug 06 2014

A361198 Consider a perfect infinite binary tree with nodes labeled with distinct positive integers where n appears at level A082850(n) and each level is filled from left to right; a(n) is the sibling of n in this tree.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 04 2023

Keywords

Comments

This sequence is a self-inverse permutation of the positive integers with no fixed point.
We can build a similar tree from any sequence of positive integers where each value appears infinitely many times. The choice of A082850 is interesting as each parent node appears immediately after its second child; also, for each pair of nodes of the same level, say p and p', and each pair of nodes, c and c', where c has ancestor p and c' has ancestor p', and the relative position of p with respect to c is the same as for p' with respect to c', we have p - c = p' - c'.
Empirically: to compute a(n): replace the least significant nonzero digit in the skew-binary expansion of n, say d, by 3-d. - Rémy Sigrist, Mar 02 2025

Examples

			The perfect infinite binary tree starts as follows:
                                 31
                  ---------------------------------
                 15                              30
          -----------------               -----------------
          7              14              22              29
      ---------       ---------       ---------       ---------
      3       6      10      13      18      21      25      28
    -----   -----   -----   -----   -----   -----   -----   -----
    1   2   4   5   8   9  11  12  16  17  19  20  23  24  26  27
.
So a(1) = 2 and a(2) = 1, a(4) = 5 and a(5) = 4, etc.,
   a(3) = 6 and a(6) = 3, a(10) = 13 and a(13) = 10, etc.,
   a(7) = 14 and a(14) = 7, a(22) = 29 and a(29) = 22,
   a(15) = 30 and a(30) = 15.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (n0 = n); for (h = 2, oo, if (n < 2^h-1, while (1, my (w=2^h-- - 1); if (n == w, return (n0 - n + 2*w), n == 2*w, return (n0 - n + w), n > w, n -= w)))) }

Formula

a(A101925(2*n)) = A101925(2*n + 1).
a(A101925(2*n + 1)) = A101925(2*n).
A082850(a(n)) = A082850(n).
a(2^k - 1) = 2^(k+1) - 2 for any k > 0.
abs(a(n) - n) = 2^A082850(n) - 1 (belongs to A126646).
Apparently, a(n) < n iff A308187(n+1) = 1.
Previous Showing 11-13 of 13 results.