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!)
A276083 a(0) = 0, a(2n) = A255411(a(n)), a(2n+1) = 1+A153880(a(n)). 5

%I #16 Apr 30 2021 17:08:42

%S 0,1,4,3,18,13,16,9,96,73,76,51,90,61,64,33,600,481,484,363,498,373,

%T 376,249,576,433,436,291,450,301,304,153,4320,3601,3604,2883,3618,

%U 2893,2896,2169,3696,2953,2956,2211,2970,2221,2224,1473,4200,3361,3364,2523,3378,2533,2536,1689,3456,2593,2596,1731,2610,1741,1744,873,35280,30241

%N a(0) = 0, a(2n) = A255411(a(n)), a(2n+1) = 1+A153880(a(n)).

%H Antti Karttunen, <a href="/A276083/b276083.txt">Table of n, a(n) for n = 0..8191</a>

%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>

%F a(0) = 0, a(2n) = A255411(a(n)), a(2n+1) = 1+A153880(a(n)).

%F Other identities. For all n >= 0:

%F a(n) = A225901(A276082(n)).

%o (Scheme, with memoization-macro definec)

%o (definec (A276083 n) (cond ((zero? n) n) ((even? n) (A255411 (A276083 (/ n 2)))) (else (+ 1 (A153880 (A276083 (/ (- n 1) 2)))))))

%o (Python)

%o from sympy import factorial as f

%o def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p

%o def a255411(n):

%o x=(str(a007623(n)) + '0')

%o y="".join(str(int(i) + 1) if int(i)>0 else '0' for i in x)[::-1]

%o return 0 if n==0 else sum([int(y[i])*f(i + 1) for i in range(len(y))])

%o def a153880(n):

%o x=(str(a007623(n)) + '0')[::-1]

%o return 0 if n==0 else sum([int(x[i])*f(i + 1) for i in range(len(x))])

%o def a(n): return 0 if n==0 else a255411(a(n//2)) if n%2==0 else 1 + a153880(a((n - 1)//2))

%o print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jun 20 2017

%Y Cf. A153880, A255411.

%Y Cf. also A059590, A275959, A276091, A225901, A276082.

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Aug 21 2016

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)