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.
%I A276151 #24 Mar 18 2021 11:17:29 %S A276151 0,0,2,2,4,0,6,6,8,8,10,6,12,12,14,14,16,12,18,18,20,20,22,18,24,24, %T A276151 26,26,28,0,30,30,32,32,34,30,36,36,38,38,40,36,42,42,44,44,46,42,48, %U A276151 48,50,50,52,48,54,54,56,56,58,30,60,60,62,62,64,60,66,66,68,68,70,66,72,72,74,74,76,72,78,78,80,80,82,78,84,84,86,86,88,60,90,90,92 %N A276151 n minus the greatest primorial number (A002110) which divides n: a(n) = n - A053589(n). %C A276151 Subtract one (in primorial base representation A049345) from the least significant nonzero digit of n, then convert back to decimal. %H A276151 Antti Karttunen, <a href="/A276151/b276151.txt">Table of n, a(n) for n = 1..2310</a> %H A276151 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a> %F A276151 a(n) = n - A053589(n) = n - A002110(A276084(n)). %F A276151 a(n) = A276085(A032742(A276086(n))). - _Antti Karttunen_, May 11 2017 %t A276151 Table[If[n == 1, 0, n - Times @@ Prime@ Flatten@ Position[TakeWhile[#, # > 0 &], 1] &@ Function[f, ReplacePart[Table[0, {PrimePi[f[[-1, 1]]]}], #] &@ Map[PrimePi@ First@ # -> 1 &, f]]@ FactorInteger@ n], {n, 93}] (* or *) %t A276151 Table[n - If[OddQ@ n, 1, Function[p, Product[Prime@ k, {k, #[[p]]}]][LengthWhile[Differences@ #, # == 1 &] + 1] &@ PrimePi[FactorInteger[n][[All, 1]]]], {n, 93}] (* _Michael De Vlieger_, Aug 26 2016 *) %o A276151 (Scheme) (define (A276151 n) (- n (A053589 n))) %o A276151 (Python) %o A276151 from sympy import nextprime, primepi, primorial %o A276151 def a002110(n): return 1 if n<1 else primorial(n) %o A276151 def a053669(n): %o A276151 p = 2 %o A276151 while True: %o A276151 if n%p!=0: return p %o A276151 else: p=nextprime(p) %o A276151 def a276084(n): return primepi(a053669(n)) - 1 %o A276151 def a(n): return n - a002110(a276084(n)) %o A276151 print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Jun 23 2017 %Y A276151 Cf. A002110 (positions of zeros), A032742, A049345, A053589, A111701, A276084, A276085, A276086. %K A276151 nonn %O A276151 1,3 %A A276151 _Antti Karttunen_, Aug 23 2016