login
a(n) = A099563(A000407(n)); the most significant digit in factorial base representation of (2n+1)! / n!.
6

%I #25 Feb 14 2024 01:05:14

%S 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,

%T 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,

%U 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

%N a(n) = A099563(A000407(n)); the most significant digit in factorial base representation of (2n+1)! / n!.

%H Antti Karttunen, <a href="/A265891/b265891.txt">Table of n, a(n) for n = 0..10080</a>

%H Antti Karttunen, <a href="/A265891/a265891.png">Scatter-plot of the graph drawn for the terms n=0 .. 1024, with the help of OEIS-plot utility</a>.

%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>.

%F a(n) = A099563(A000407(n)).

%F a(n) = A265890(n+1, n+1).

%e The terms A000407(0) .. A000407(8) in factorial base representation (A007623) look as:

%e 1, 100, 2200, 110000, 3000000, 82000000, 2374000000, 65500000000, 1550000000000, ...

%e 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, ...

%t 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 *)

%o (PARI)

%o allocatemem((2^31)); \\ Enough?

%o A099563(n) = { my(i=2,dig=0); until(0==n, dig = n % i; n = (n - dig)/i; i++); return(dig); };

%o A265891 = n -> A099563(((2*n)+1)! / n!);

%o for(n=0, 10080, write("b265891.txt", n, " ", A265891(n)));

%o (Scheme, two variants)

%o (define (A265891 n) (A099563 (A000407 n)))

%o (define (A265891 n) (A265890bi (+ 1 n) (+ 1 n))) ;; Code for A265890bi given in A265890.

%Y Cf. A000407, A007623, A099563.

%Y Main diagonal of A265890 (apart from the corner term).

%Y Cf. A265897 (positions of ones).

%Y Cf. also A265894.

%K nonn,base,look

%O 0,3

%A _Antti Karttunen_, Dec 20 2015