login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A277021 Left inverse of A277022. 3
0, 1, 2, 2, 6, 3, 4, 3, 30, 7, 8, 4, 12, 5, 6, 4, 210, 31, 32, 8, 36, 9, 10, 5, 60, 13, 14, 6, 18, 7, 8, 5, 2310, 211, 212, 32, 216, 33, 34, 9, 240, 37, 38, 10, 42, 11, 12, 6, 420, 61, 62, 14, 66, 15, 16, 7, 90, 19, 20, 8, 24, 9, 10, 6, 30030, 2311, 2312, 212, 2316, 213, 214, 33, 2340, 217, 218, 34, 222, 35, 36, 10, 2520, 241, 242 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..8191

Index entries for sequences related to binary expansion of n

Index entries for sequences related to primorial base

FORMULA

a(n) = A276085(A005940(1+n)).

Other identities. For all n >= 0:

a(A277022(n)) = n.

PROG

(Scheme)

(define (A277021 n) (let loop ((s 0) (n n) (r 0) (i 1) (pr 1)) (cond ((zero? n) (+ s (* r pr))) ((even? n) (loop (+ s (* r pr)) (/ n 2) 0 (+ 1 i) (* (A000040 i) pr))) (else (loop s (/ (- n 1) 2) (+ 1 r) i pr)))))

(Python)

from sympy import primorial, primepi, prime, factorint, floor, log

def a002110(n): return 1 if n<1 else primorial(n)

def a276085(n):

    f=factorint(n)

    return sum([f[i]*a002110(primepi(i) - 1) for i in f])

def A(n): return n - 2**int(floor(log(n, 2)))

def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))

def a(n): return a276085(b(n - 1))

print [a(n) for n in xrange(1, 101)] # Indranil Ghosh, Jun 22 2017

CROSSREFS

Left inverse of A277022.

Cf. A005940, A276085.

Cf. also A277017.

Sequence in context: A128623 A182701 A277011 * A275037 A174833 A085738

Adjacent sequences:  A277018 A277019 A277020 * A277022 A277023 A277024

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Sep 26 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 12:57 EDT 2019. Contains 327198 sequences. (Running on oeis4.)