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.

A265894 a(n) = A099563(A001813(n)); the most significant digit in factorial base representation of (2n)! / n!.

Original entry on oeis.org

1, 1, 2, 1, 2, 6, 1, 4, 1, 2, 7, 1, 3, 10, 1, 3, 11, 1, 3, 10, 1, 3, 8, 25, 2, 6, 19, 1, 4, 13, 38, 2, 7, 23, 1, 4, 13, 39, 2, 6, 20, 1, 3, 9, 29, 1, 4, 13, 40, 1, 5, 16, 51, 2, 6, 20, 62, 2, 7, 23, 70, 2, 8, 25, 77, 2, 8, 25, 79, 2, 8, 25, 78, 2, 7, 23, 73, 2, 6, 21, 66, 1, 6, 18, 57, 1, 4, 15, 47, 1, 3, 12, 38, 118, 3, 9
Offset: 0

Views

Author

Antti Karttunen, Dec 24 2015

Keywords

Examples

			The terms A001813(0) .. A001813(8) in factorial base representation (A007623) look as:
  1, 10, 200, 10000, 220000, 6000000, 174000000, 4760000000, 110000000000, ...
Taking the first digit (actually: a place holder value) of each gives the terms a(0) .. a(8) of this sequence: 1, 1, 2, 1, 2, 6, 1, 4, 1, ...
		

Crossrefs

Submain diagonal of A265890.
Cf. A265898 (positions of ones), A265899 (of descents), A266120 (local maxima just before those descents).
Cf. also A265891.

Programs

  • Mathematica
    factBaseIntDs[n_] := Module[{m, i, len, dList, currDigit}, i = 1; While[n > i!, i++ ]; m = n; len = i; dList = Table[0, {len}]; Do[ currDigit = 0; While[m >= j!, m = m - j!; currDigit++ ]; dList[[len - j + 1]] = currDigit, {j, i, 1, -1}]; If[dList[[1]] == 0, dList = Drop[dList, 1]]; dList]; (* taken from A007623,  Alonso del Arte, May 03 2006 *) f[n_] := factBaseIntDs[(2 n)!/n!][[1]]; Array[f, 96, 0] (* Robert G. Wilson v, Dec 25 2015 *)
  • PARI
    allocatemem((2^31)); \\ Enough?
    A099563(n) = { my(i=2,dig=0); until(0==n, dig = n % i; n = (n - dig)/i; i++); return(dig); };
    A265894 = n -> A099563((2*n)! / n!);
    
  • Scheme
    (define (A265894 n) (A099563 (A001813 n)))
    
  • Scheme
    (define (A265894 n) (A265890bi (+ 1 n) n)) ;; Code for A265890bi given in A265890.

Formula

a(n) = A099563(A001813(n)).
a(n) = A265890(n+1, n).