login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A276093 The least significant nonzero digit in primorial base is replaced with zero: a(n) = n - A276094(n), a(0) = 0. 4

%I #12 Aug 31 2016 20:53:15

%S 0,0,0,2,0,4,0,6,6,8,6,10,0,12,12,14,12,16,0,18,18,20,18,22,0,24,24,

%T 26,24,28,0,30,30,32,30,34,30,36,36,38,36,40,30,42,42,44,42,46,30,48,

%U 48,50,48,52,30,54,54,56,54,58,0,60,60,62,60,64,60,66,66,68,66,70,60,72,72,74,72,76,60,78,78,80,78,82,60,84,84,86,84,88,0,90

%N The least significant nonzero digit in primorial base is replaced with zero: a(n) = n - A276094(n), a(0) = 0.

%H Antti Karttunen, <a href="/A276093/b276093.txt">Table of n, a(n) for n = 0..2310</a>

%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>

%F a(n) = n - A276094(n).

%e n A049345 with the rightmost converted back

%e nonzero replaced by 0 to decimal = a(n)

%e ---------------------------------------------------------

%e 0 0 0 0

%e 1 1 0 0

%e 2 10 00 0

%e 3 11 10 2

%e 4 20 00 0

%e 5 21 20 4

%e 6 100 000 0

%e 7 101 100 6

%e 8 110 100 6

%e 9 111 110 8

%e 10 120 100 6

%e 11 121 120 10

%e 12 200 000 0

%e 13 201 200 12

%e 14 210 200 12

%e 15 211 210 14

%e 16 220 200 12

%t nn = 91; b = MixedRadix[Reverse@ Prime@ Range@ PrimePi[nn + 1]]; FromDigits[#, b] & /@ Join[{{0}}, Table[Function[w, Join[Take[w, Length@ w - # - 1], ConstantArray[0, # + 1]] &@ Length@ TakeWhile[Reverse@ w, # == 0 &]]@ IntegerDigits[n, b], {n, nn}]] (* Version 10.2, or *)

%t 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]]]; g[w_List] := Total[Times @@@ Transpose@ {Map[Times @@ # &, Prime@ Range@ Range[0, Length@ w - 1]], Reverse@ w}]; g /@ Join[{{0}}, Table[Function[w, Join[Take[w, Length@ w - # - 1], ConstantArray[0, # + 1]] &@ Length@ TakeWhile[Reverse@ w, # == 0 &]]@ f@ n, {n, 91}]] (* _Michael De Vlieger_, Aug 30 2016 *)

%o (Scheme) (define (A276093 n) (- n (A276094 n)))

%Y Cf. A276094, A276086.

%K nonn,base

%O 0,4

%A _Antti Karttunen_, Aug 22 2016

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)