A265891 a(n) = A099563(A000407(n)); the most significant digit in factorial base representation of (2n+1)! / n!.
1, 1, 2, 1, 3, 8, 2, 6, 1, 3, 10, 1, 5, 14, 1, 5, 16, 1, 5, 15, 1, 4, 12, 1, 3, 9, 28, 2, 6, 19, 1, 3, 11, 35, 2, 6, 19, 1, 3, 10, 30, 1, 4, 14, 44, 2, 6, 20, 61, 2, 8, 25, 1, 3, 10, 31, 1, 3, 11, 35, 1, 4, 12, 38, 1, 4, 12, 39, 1, 4, 12, 39, 1, 3, 11, 36, 1, 3, 10, 33, 102, 3, 9, 28, 89, 2, 7, 23, 74, 1, 6, 19, 59
Offset: 0
Examples
The terms A000407(0) .. A000407(8) in factorial base representation (A007623) look as: 1, 100, 2200, 110000, 3000000, 82000000, 2374000000, 65500000000, 1550000000000, ... 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, 3, 8, 2, 6, 1, ...
Links
Crossrefs
Programs
-
Mathematica
a[n_] := Module[{k = (2*n+1)!/n!, m = 2, r, d=0}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, If[r > 0, d = r]; m++]; d]; Array[a, 100, 0] (* Amiram Eldar, Feb 14 2024 *)
-
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); }; A265891 = n -> A099563(((2*n)+1)! / n!);
-
Scheme
(define (A265891 n) (A099563 (A000407 n)))
-
Scheme
(define (A265891 n) (A265890bi (+ 1 n) (+ 1 n))) ;; Code for A265890bi given in A265890.