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!)
A276091 Numbers obtained by reinterpreting base-2 representation of n in A001563-base (A276326): a(n) = Sum_{k>=0} A030308(n,k)*A001563(k+1). 13

%I #40 Sep 26 2021 05:07:30

%S 0,1,4,5,18,19,22,23,96,97,100,101,114,115,118,119,600,601,604,605,

%T 618,619,622,623,696,697,700,701,714,715,718,719,4320,4321,4324,4325,

%U 4338,4339,4342,4343,4416,4417,4420,4421,4434,4435,4438,4439,4920,4921,4924,4925,4938,4939,4942,4943,5016,5017,5020,5021,5034,5035,5038,5039,35280,35281

%N Numbers obtained by reinterpreting base-2 representation of n in A001563-base (A276326): a(n) = Sum_{k>=0} A030308(n,k)*A001563(k+1).

%C Numbers that are sums of distinct terms of A001563.

%C A number is included if and only if all the nonzero digits in its factorial base representation (A007623) are maximal allowed in those digit positions, thus this sequence gives all numbers n for which A060130(n) = A260736(n).

%C Numbers n for which A276328(n) = A276337(n), thus from 1 onward the positions of ones in A276336.

%C Conjectured also to give all numbers n for which A255411(n) = A276340(n) (thus zeros of A276339).

%H Antti Karttunen, <a href="/A276091/b276091.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+A255411(a(n)).

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

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

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

%F a(n) = A276090(A275959(n)).

%F A276328(a(n)) = A276337(a(n)) = A000120(n).

%t Table[Total[Times @@@ Transpose@ {Map[# #! &, Range@ Length@ #], Reverse@ #}] &@ IntegerDigits[n, 2], {n, 64}] (* _Michael De Vlieger_, Aug 31 2016 *)

%o (Scheme)

%o ;; This is a standalone program:

%o (define (A276091 n) (let loop ((n n) (s 0) (f 1) (i 2)) (cond ((zero? n) s) ((even? n) (loop (/ n 2) s (* i f) (+ 1 i))) (else (loop (/ (- n 1) 2) (+ s (* (- i 1) f)) (* i f) (+ 1 i))))))

%o ;; This implements one of the given recurrences:

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

%o ;; Alternatively, we can use A276340 in place of A255411:

%o (definec (A276091 n) (cond ((zero? n) n) ((even? n) (A276340 (A276091 (/ n 2)))) (else (+ 1 (A276340 (A276091 (/ (- 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 a(n): return 0 if n==0 else a255411(a(n//2)) if n%2==0 else 1 + a255411(a((n - 1)//2))

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

%Y Cf. A000120, A000142, A001563, A030308, A059590, A060130, A260736, A225901, A255411, A275959, A276082, A276083, A276090, A276326, A276328, A276336, A276337, A276339, A276340.

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Aug 19 2016

%E Name changed (to emphasize the functional nature of the sequence) with the original definition moved to the comments by _Antti Karttunen_, Sep 01 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 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)