This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A276088 The least significant nonzero digit in primorial base representation of n: a(n) = A276094(n) / A002110(A276084(n)) (with a(0) = 0). 4
 0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS For any n >= 1, start from k = n and repeatedly try to divide as many successive primes as possible out of k, iterating as k/2 -> k, k/3 -> k, k/5 -> k, until a nonzero remainder is encountered, which is then the value of a(n). (See the last example). Note that the sequence has been defined so that it will eventually include also "digits" (actually: value holders) > 9 that occur as the least significant nonzero digits in primorial base representation. Thus any eventual decimal corruption of A049345 will not affect these values. LINKS Antti Karttunen, Table of n, a(n) for n = 0..2310 FORMULA a(0) = 0, and for n >= 1, a(n) = A276094(n) / A002110(A276084(n)). EXAMPLE n   A049345  the rightmost nonzero = a(n) ---------------------------------------------------------    0       0             0    1       1             1    2      10             1    3      11             1    4      20             2    5      21             1    6     100             1    7     101             1    8     110             1    9     111             1   10     120             2   11     121             1   12     200             2   13     201             1   14     210             1   15     211             1   16     220             2 . For n=48 according to the iteration interpretation, we obtain first 48/2 = 24, and the remainder is zero, so we continue: 24/3 = 8 and here the remainder is zero as well, so we try next 8/5, but this gives the nonzero remainder 3, thus a(48)=3. For n=2100, which could be written "A0000" in primorial base (where A stands for digit "ten", as 2100 = 10*A002110(4)), the least significant nonzero value holder (also the most significant) is thus 10 and a(2100) = 10. (The first point where this sequence attains a value larger than 9). MATHEMATICA nn = 120; b = MixedRadix[Reverse@ Prime@ Range@ PrimePi[nn + 1]]; Table[Last[IntegerDigits[n, b] /. 0 -> Nothing, 0], {n, 0, nn}] (* Version 11, or *) f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Prime@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Prime@ Range[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[Last@ DeleteCases[f@ n, d_ /; d == 0], {n, 120}] (* Michael De Vlieger, Aug 30 2016 *) PROG (Scheme, two versions) (define (A276088 n) (if (zero? n) n (let loop ((n n) (i 1)) (let* ((p (A000040 i)) (d (modulo n p))) (if (not (zero? d)) d (loop (/ (- n d) p) (+ 1 i))))))) (define (A276088 n) (if (zero? n) n (/ (A276094 n) (A002110 (A276084 n))))) (Python) from sympy import nextprime, primepi, primorial def a053669(n):     p = 2     while True:         if n%p!=0: return p         else: p=nextprime(p) def a257993(n): return primepi(a053669(n)) def a002110(n): return 1 if n<1 else primorial(n) def a276094(n): return 0 if n==0 else n%a002110(a257993(n)) def a(n): return 0 if n==0 else a276094(n)/a002110(a257993(n) - 1) print [a(n) for n in xrange(101)] # Indranil Ghosh, Jun 22 2017 CROSSREFS Cf. A000040, A002110, A049345, A276084, A276094. Sequence in context: A071625 A304779 A049100 * A030612 A264857 A303837 Adjacent sequences:  A276085 A276086 A276087 * A276089 A276090 A276091 KEYWORD nonn,base AUTHOR Antti Karttunen, Aug 22 2016 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 21 20:03 EDT 2019. Contains 322328 sequences. (Running on oeis4.)