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

A138523 a(n) = Sum_{k=1..n} (2k-1)!.

Original entry on oeis.org

1, 7, 127, 5167, 368047, 40284847, 6267305647, 1313941673647, 357001369769647, 122002101778601647, 51212944273488041647, 25903229683158464681647, 15537113273014144448681647, 10904406563691366305216681647, 8852666400303393320848832681647, 8231691320578226211046411712681647
Offset: 1

Views

Author

Leroy Quet, Mar 23 2008

Keywords

Comments

a(n) is divisible by 107 for n >= 53. - Robert Israel, Dec 01 2015
Last digit is 7 for n > 1. Therefore there is no square in this sequence except 1. - Altug Alkan, Dec 01 2015
a(n) is the rank of [2,1, 4,3, ..., 2n,2n-1] within the permutations of [1, 2, ... 2n-1, 2n] in lexicographic order. See A375302 for the ranking function. - Hugo Pfoertner, Aug 25 2024

Crossrefs

Programs

  • Maple
    a:=proc(n) options operator, arrow: sum(factorial(2*k-1), k=1..n) end proc: seq(a(n), n=1..14); # Emeric Deutsch, Mar 31 2008
  • Mathematica
    Table[Sum[(2i - 1)!, {i, n}], {n, 15}] (* Stefan Steinerberger, Mar 25 2008 *)
  • PARI
    a(n) = sum(k=1, n, (2*k-1)!); \\ Michel Marcus, Oct 28 2015

Formula

Recurrence: a(1) = 1, a(2) = 7, a(n) = (4*n^2-6*n+3)*a(n-1) - 2*(n-1)*(2*n-1)*a(n-2). - Vladimir Reshetnikov, Oct 28 2015

Extensions

More terms from Stefan Steinerberger, Emeric Deutsch and Robert G. Wilson v, Mar 25 2008

A375301 Triangle T(n,k) read by rows with row n equal to the unique permutation pi_n of [1, ..., n] such that k + pi_n(k) is a power of 2 for 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 3, 2, 1, 4, 1, 2, 5, 4, 3, 1, 6, 5, 4, 3, 2, 7, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, 8, 1, 6, 5, 4, 3, 2, 9, 8, 7, 1, 2, 5, 4, 3, 10, 9, 8, 7, 6, 3, 2, 1, 4, 11, 10, 9, 8, 7, 6, 5, 3, 2, 1, 12, 11, 10, 9, 8, 7, 6, 5, 4, 1, 2, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3
Offset: 1

Views

Author

Hugo Pfoertner, Aug 25 2024

Keywords

Examples

			The triangle begins
  1,
  1, 2,
  3, 2, 1,
  3, 2, 1, 4,
  1, 2, 5, 4, 3,
  1, 6, 5, 4, 3, 2,
  7, 6, 5, 4, 3, 2, 1,
  7, 6, 5, 4, 3, 2, 1, 8,
  ...
Row 5: [1, 2, 5, 4, 3] + [1, 2, 3, 4, 5] = [2, 4, 8, 8, 8]; only powers of 2 in the vector of sums.
		

Crossrefs

A375302 gives the rank of row n in lexicographically ordered permutations of [n].
Cf. A000079.

Programs

  • PARI
    a375301_row(n) = forperm(n, p, my(f=1); for(k=1, n, my(s=p[k]+k); if(2^valuation(s,2)!=s, f=0; break)); if(f==1, return(Vec(p))))

A375303 a(n) is the rank of row n of A130517 in a lexicographic permutation of [1, ..., n].

Original entry on oeis.org

0, 1, 4, 20, 108, 678, 4848, 39264, 355920, 3575640, 39454560, 474501600, 6178566240, 86606881200, 1300352981760, 20821540239360, 354184575816960, 6378546460970880, 121243261343500800, 2425719783585369600, 50955334461183398400, 1121303792572973856000, 25795667534014525593600
Offset: 1

Views

Author

Hugo Pfoertner, Aug 26 2024

Keywords

Crossrefs

Programs

  • PARI
    \\ uses functions a130517_row from A130517 and rank from A375302.
    a(n) = rank(a130517_row(n))
Showing 1-3 of 3 results.