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!)
A276151 n minus the greatest primorial number (A002110) which divides n: a(n) = n - A053589(n). 14
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, 26, 26, 28, 0, 30, 30, 32, 32, 34, 30, 36, 36, 38, 38, 40, 36, 42, 42, 44, 44, 46, 42, 48, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Subtract one (in primorial base representation A049345) from the least significant nonzero digit of n, then convert back to decimal.
LINKS
FORMULA
a(n) = n - A053589(n) = n - A002110(A276084(n)).
a(n) = A276085(A032742(A276086(n))). - Antti Karttunen, May 11 2017
MATHEMATICA
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 *)
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 *)
PROG
(Scheme) (define (A276151 n) (- n (A053589 n)))
(Python)
from sympy import nextprime, primepi, primorial
def a002110(n): return 1 if n<1 else primorial(n)
def a053669(n):
p = 2
while True:
if n%p!=0: return p
else: p=nextprime(p)
def a276084(n): return primepi(a053669(n)) - 1
def a(n): return n - a002110(a276084(n))
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 23 2017
CROSSREFS
Cf. A002110 (positions of zeros), A032742, A049345, A053589, A111701, A276084, A276085, A276086.
Sequence in context: A061006 A080736 A326127 * A144412 A360603 A337299
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 23 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 09:09 EDT 2024. Contains 372131 sequences. (Running on oeis4.)