[go: up one dir, main page]

login
A265891
a(n) = A099563(A000407(n)); the most significant digit in factorial base representation of (2n+1)! / n!.
6
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,3
FORMULA
a(n) = A099563(A000407(n)).
a(n) = A265890(n+1, n+1).
EXAMPLE
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, ...
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 *)
PROG
(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!);
for(n=0, 10080, write("b265891.txt", n, " ", A265891(n)));
(Scheme, two variants)
(define (A265891 n) (A099563 (A000407 n)))
(define (A265891 n) (A265890bi (+ 1 n) (+ 1 n))) ;; Code for A265890bi given in A265890.
CROSSREFS
Main diagonal of A265890 (apart from the corner term).
Cf. A265897 (positions of ones).
Cf. also A265894.
Sequence in context: A203997 A057740 A320875 * A248354 A260142 A194505
KEYWORD
nonn,base,look
AUTHOR
Antti Karttunen, Dec 20 2015
STATUS
approved