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.

A276153 The most significant digit when n is written in primorial base (A049345).

This page as a plain text file.
%I A276153 #14 Aug 31 2016 20:54:03
%S A276153 0,1,1,1,2,2,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,1,1,1,1,
%T A276153 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,
%U A276153 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4
%N A276153 The most significant digit when n is written in primorial base (A049345).
%H A276153 Antti Karttunen, <a href="/A276153/b276153.txt">Table of n, a(n) for n = 0..30030</a>
%H A276153 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%F A276153 a(n) = A071178(A276086(n)).
%e A276153 For n=24, which is "400" in primorial base (as 24 = 4*(3*2*1) + 0*(2*1) + 0*1, see A049345), the most significant digit is 4, thus a(24) = 4.
%e A276153 For n=210, which is "10000" in primorial base (as 210 = A002110(4) = 7*5*3*2*1), the most significant digit is 1, thus a(210) = 1.
%e A276153 For n=2100, which could be written "A0000" in primorial base (where A stands for digit "ten", as 2100 = 10*A002110(4)), the most significant value holder is thus 10 and a(2100) = 10. (The first point where this sequence attains a value larger than 9).
%t A276153 nn = 120; Table[First@ IntegerDigits[n, MixedRadix[Reverse@ Prime@ Range@ PrimePi@ nn]], {n, 0, nn}] (* _Michael De Vlieger_, Aug 25 2016, Version 10.2 *)
%o A276153 (Scheme) (define (A276153 n) (let loop ((n n) (i 1)) (let* ((p (A000040 i)) (dig (modulo n p)) (next-n (/ (- n dig) p))) (if (zero? next-n) dig (loop next-n (+ 1 i))))))
%Y A276153 Cf. A000040, A002110, A049345, A071178, A276086.
%Y A276153 Differs from A099563 for the first time at n=24.
%Y A276153 Differs from A099564 for the first time at n=210, where a(210)=1, while A099564(210)=7.
%K A276153 nonn,base
%O A276153 0,5
%A A276153 _Antti Karttunen_, Aug 22 2016