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.

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

This page as a plain text file.
%I A276093 #12 Aug 31 2016 20:53:15
%S A276093 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 A276093 26,24,28,0,30,30,32,30,34,30,36,36,38,36,40,30,42,42,44,42,46,30,48,
%U A276093 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 A276093 The least significant nonzero digit in primorial base is replaced with zero: a(n) = n - A276094(n), a(0) = 0.
%H A276093 Antti Karttunen, <a href="/A276093/b276093.txt">Table of n, a(n) for n = 0..2310</a>
%H A276093 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%F A276093 a(n) = n - A276094(n).
%e A276093    n   A049345  with the rightmost      converted back
%e A276093                 nonzero replaced by 0   to decimal = a(n)
%e A276093 ---------------------------------------------------------
%e A276093    0       0             0                     0
%e A276093    1       1             0                     0
%e A276093    2      10            00                     0
%e A276093    3      11            10                     2
%e A276093    4      20            00                     0
%e A276093    5      21            20                     4
%e A276093    6     100           000                     0
%e A276093    7     101           100                     6
%e A276093    8     110           100                     6
%e A276093    9     111           110                     8
%e A276093   10     120           100                     6
%e A276093   11     121           120                    10
%e A276093   12     200           000                     0
%e A276093   13     201           200                    12
%e A276093   14     210           200                    12
%e A276093   15     211           210                    14
%e A276093   16     220           200                    12
%t A276093 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 A276093 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 A276093 (Scheme) (define (A276093 n) (- n (A276094 n)))
%Y A276093 Cf. A276094, A276086.
%K A276093 nonn,base
%O A276093 0,4
%A A276093 _Antti Karttunen_, Aug 22 2016