The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A276082 a(0) = 0, a(2n) = A153880(a(n)), a(2n+1) = 1+A255411(a(n)). 5
0, 1, 2, 5, 6, 13, 14, 23, 24, 49, 50, 77, 54, 85, 86, 119, 120, 241, 242, 365, 246, 373, 374, 503, 264, 409, 410, 557, 414, 565, 566, 719, 720, 1441, 1442, 2165, 1446, 2173, 2174, 2903, 1464, 2209, 2210, 2957, 2214, 2965, 2966, 3719, 1560, 2401, 2402, 3245, 2406, 3253, 3254, 4103, 2424, 3289, 3290, 4157, 3294, 4165, 4166, 5039, 5040, 10081 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(0) = 0, a(2n) = A153880(a(n)), a(2n+1) = 1+A255411(a(n)).
Other identities. For all n >= 0:
a(n) = A225901(A276083(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A276082 n) (cond ((zero? n) n) ((even? n) (A153880 (A276082 (/ n 2)))) (else (+ 1 (A255411 (A276082 (/ (- n 1) 2)))))))
(Python)
from sympy import factorial as f
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a255411(n):
x=str(a007623(n)) + '0'
y="".join(str(int(i) + 1) if int(i)>0 else '0' for i in x)[::-1]
return 0 if n==0 else sum([int(y[i])*f(i + 1) for i in range(len(y))])
def a153880(n):
x=(str(a007623(n)) + '0')[::-1]
return 0 if n==0 else sum([int(x[i])*f(i + 1) for i in range(len(x))])
def a(n): return 0 if n==0 else a153880(a(n//2)) if n%2==0 else 1 + a255411(a((n - 1)//2))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017
CROSSREFS
Sequence in context: A354025 A100613 A070911 * A113240 A098376 A342569
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 21 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 May 14 17:26 EDT 2024. Contains 372533 sequences. (Running on oeis4.)