|
|
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
|
|
|
0, 1, 4, 5, 18, 19, 22, 23, 96, 97, 100, 101, 114, 115, 118, 119, 600, 601, 604, 605, 618, 619, 622, 623, 696, 697, 700, 701, 714, 715, 718, 719, 4320, 4321, 4324, 4325, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Numbers that are sums of distinct terms of A001563.
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).
|
|
LINKS
|
|
|
FORMULA
|
Other identities. For all n >= 0:
|
|
MATHEMATICA
|
Table[Total[Times @@@ Transpose@ {Map[# #! &, Range@ Length@ #], Reverse@ #}] &@ IntegerDigits[n, 2], {n, 64}] (* Michael De Vlieger, Aug 31 2016 *)
|
|
PROG
|
(Scheme)
;; This is a standalone program:
(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))))))
;; This implements one of the given recurrences:
(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 a(n): return 0 if n==0 else a255411(a(n//2)) if n%2==0 else 1 + a255411(a((n - 1)//2))
|
|
CROSSREFS
|
Cf. A000120, A000142, A001563, A030308, A059590, A060130, A260736, A225901, A255411, A275959, A276082, A276083, A276090, A276326, A276328, A276336, A276337, A276339, A276340.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Name changed (to emphasize the functional nature of the sequence) with the original definition moved to the comments by Antti Karttunen, Sep 01 2016
|
|
STATUS
|
approved
|
|
|
|