A275727
a(0) = 0, for n >= 1, a(n) = A275736(n) + 2*a(A257684(n)).
Original entry on oeis.org
0, 1, 2, 3, 2, 3, 4, 5, 6, 7, 6, 7, 4, 5, 6, 7, 6, 7, 4, 5, 6, 7, 6, 7, 8, 9, 10, 11, 10, 11, 12, 13, 14, 15, 14, 15, 12, 13, 14, 15, 14, 15, 12, 13, 14, 15, 14, 15, 8, 9, 10, 11, 10, 11, 12, 13, 14, 15, 14, 15, 12, 13, 14, 15, 14, 15, 12, 13, 14, 15, 14, 15, 8, 9, 10, 11, 10, 11, 12, 13, 14, 15, 14, 15, 12, 13, 14, 15
Offset: 0
For n=19, A007623(19) = 301, thus a(19) = 5 because A007088(5) = 101.
A275808
a(0) = 0, for n >= 1, a(n) = A275736(n) XOR a(A257684(n)), where XOR is given by A003987.
Original entry on oeis.org
0, 1, 2, 3, 1, 0, 4, 5, 6, 7, 5, 4, 2, 3, 0, 1, 3, 2, 1, 0, 3, 2, 0, 1, 8, 9, 10, 11, 9, 8, 12, 13, 14, 15, 13, 12, 10, 11, 8, 9, 11, 10, 9, 8, 11, 10, 8, 9, 4, 5, 6, 7, 5, 4, 0, 1, 2, 3, 1, 0, 6, 7, 4, 5, 7, 6, 5, 4, 7, 6, 4, 5, 2, 3, 0, 1, 3, 2, 6, 7, 4, 5, 7, 6, 0, 1, 2, 3, 1, 0, 3, 2, 1, 0, 2, 3, 1, 0, 3, 2, 0
Offset: 0
Cf.
A275809 (positions of zeros),
A275810 (and their first differences).
Original entry on oeis.org
0, 1, 2, 3, 1, 2, 4, 5, 6, 7, 5, 6, 2, 3, 4, 5, 3, 4, 1, 2, 3, 4, 2, 3, 8, 9, 10, 11, 9, 10, 12, 13, 14, 15, 13, 14, 10, 11, 12, 13, 11, 12, 9, 10, 11, 12, 10, 11, 4, 5, 6, 7, 5, 6, 8, 9, 10, 11, 9, 10, 6, 7, 8, 9, 7, 8, 5, 6, 7, 8, 6, 7, 2, 3, 4, 5, 3, 4, 6, 7, 8, 9, 7, 8, 4, 5, 6, 7, 5, 6, 3, 4, 5, 6, 4, 5, 1, 2, 3, 4
Offset: 0
A276010
a(0) = 0, for n >= 1, a(n) = A275736(n) OR a(A257684(n)), where OR is given by A003986.
Original entry on oeis.org
0, 1, 2, 3, 1, 1, 4, 5, 6, 7, 5, 5, 2, 3, 2, 3, 3, 3, 1, 1, 3, 3, 1, 1, 8, 9, 10, 11, 9, 9, 12, 13, 14, 15, 13, 13, 10, 11, 10, 11, 11, 11, 9, 9, 11, 11, 9, 9, 4, 5, 6, 7, 5, 5, 4, 5, 6, 7, 5, 5, 6, 7, 6, 7, 7, 7, 5, 5, 7, 7, 5, 5, 2, 3, 2, 3, 3, 3, 6, 7, 6, 7, 7, 7, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 3, 3, 1, 1, 5, 5, 7, 7, 5, 5, 3
Offset: 0
A225901
Write n in factorial base, then replace each nonzero digit d of radix k with k-d.
Original entry on oeis.org
0, 1, 4, 5, 2, 3, 18, 19, 22, 23, 20, 21, 12, 13, 16, 17, 14, 15, 6, 7, 10, 11, 8, 9, 96, 97, 100, 101, 98, 99, 114, 115, 118, 119, 116, 117, 108, 109, 112, 113, 110, 111, 102, 103, 106, 107, 104, 105, 72, 73, 76, 77, 74, 75, 90, 91, 94, 95, 92, 93, 84, 85, 88, 89, 86, 87, 78, 79, 82, 83, 80, 81, 48, 49, 52, 53, 50, 51, 66, 67, 70, 71, 68
Offset: 0
a(1000) = a(1*6! + 2*5! + 1*4! + 2*3! + 2*2!) = (7-1)*6! + (6-2)*5! + (5-1)*4! + (4-2)*3! + (3-2)*2! = 4910.
a(1397) = a(1*6! + 5*5! + 3*4! + 0*3! + 2*2! + 1*1!) = (7-1)*6! + (6-5)*5! + (5-3)*4! + (3-2)*2! + (2-1)*1! = 4491.
Cf.
A000142,
A007623,
A004488,
A048647,
A001563,
A007489,
A257684,
A257687,
A276091,
A275736,
A276149.
-
b = MixedRadix[Reverse@ Range[2, 12]]; Table[FromDigits[Map[Boole[# > 0] &, #] (Reverse@ Range[2, Length@ # + 1] - #), b] &@ IntegerDigits[n, b], {n, 0, 82}] (* Version 10.2, or *)
f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Range[# + 1] <= n &]; Most@ Rest[a][[All, 1]] /. {} -> {0}]; g[w_List] := Total[Times @@@ Transpose@ {Map[Times @@ # &, Range@ Range[0, Length@ w]], Reverse@ Append[w, 0]}]; Table[g[Map[Boole[# > 0] &, #] (Reverse@ Range[2, Length@ # + 1] - #)] &@ f@ n, {n, 0, 82}] (* Michael De Vlieger, Aug 29 2016 *)
-
a(n)=my(s=0,d,k=2);while(n,d=n%k;n=n\k;if(d,s=s+(k-d)*(k-1)!);k=k+1);return(s)
-
from sympy import factorial as f
def a(n):
s=0
k=2
while(n):
d=n%k
n=(n//k)
if d: s=s+(k - d)*f(k - 1)
k+=1
return s
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 19 2017
-
(define (A225901 n) (let loop ((n n) (z 0) (m 2) (f 1)) (cond ((zero? n) z) (else (loop (quotient n m) (if (zero? (modulo n m)) z (+ z (* f (- m (modulo n m))))) (+ 1 m) (* f m))))))
;; One implementing the first recurrence, with memoization-macro definec:
(definec (A225901 n) (if (zero? n) n (+ (A276091 (A275736 n)) (A153880 (A225901 (A257684 n))))))
;; Antti Karttunen, Aug 29 2016
A059590
Numbers obtained by reinterpreting base-2 representation of n in the factorial base: a(n) = Sum_{k>=0} A030308(n,k)*A000142(k+1).
Original entry on oeis.org
0, 1, 2, 3, 6, 7, 8, 9, 24, 25, 26, 27, 30, 31, 32, 33, 120, 121, 122, 123, 126, 127, 128, 129, 144, 145, 146, 147, 150, 151, 152, 153, 720, 721, 722, 723, 726, 727, 728, 729, 744, 745, 746, 747, 750, 751, 752, 753, 840, 841, 842, 843, 846, 847, 848, 849, 864, 865
Offset: 0
128 is in the sequence since 5! + 3! + 2! = 128.
a(22) = 128. a(22) = a(6) + (1 + floor(log(16) / log(2)))! = 8 + 5! = 128. Also, 22 = 10110_2. Therefore, a(22) = 1 * 5! + 0 * 4! + 1 * 3! + 1 + 2! + 0 * 0! = 128. - _David A. Corneth_, Aug 21 2016
-
import Data.List (elemIndices)
a059590 n = a059590_list !! n
a059590_list = elemIndices 1 $ map a115944 [0..]
-- Reinhard Zumkeller, Dec 04 2011
-
[seq(bin2facbase(j),j=0..64)]; bin2facbase := proc(n) local i; add((floor(n/(2^i)) mod 2)*((i+1)!),i=0..floor_log_2(n)); end;
floor_log_2 := proc(n) local nn,i; nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi; nn := floor(nn/2); od; end;
# next Maple program:
a:= n-> (l-> add(l[j]*j!, j=1..nops(l)))(Bits[Split](n)):
seq(a(n), n=0..57); # Alois P. Heinz, Aug 12 2025
-
a[n_] := Reverse[id = IntegerDigits[n, 2]].Range[Length[id]]!; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Jun 19 2012, after Philippe Deléham *)
-
a(n) = if(n>0, a(n-msb(n)) + (1+logint(n,2))!, 0)
msb(n) = 2^#binary(n)>>1
{my(b = binary(n)); sum(i=1,#b,b[i]*(#b+1-i)!)} \\ David A. Corneth, Aug 21 2016
-
def facbase(k, f):
return sum(f[i] for i, bi in enumerate(bin(k)[2:][::-1]) if bi == "1")
def auptoN(N): # terms up to N factorial-base digits; 13 generates b-file
f = [factorial(i) for i in range(1, N+1)]
return list(facbase(k, f) for k in range(2**N))
print(auptoN(5)) # Michael S. Branicky, Oct 15 2022
Name changed (to emphasize the functional nature of the sequence) with the old definition moved to the comments by
Antti Karttunen, Aug 21 2016
A275732
One-based positions of 1-digits in the factorial base representation of n are converted to primes with those indices, then multiplied together.
Original entry on oeis.org
1, 2, 3, 6, 1, 2, 5, 10, 15, 30, 5, 10, 1, 2, 3, 6, 1, 2, 1, 2, 3, 6, 1, 2, 7, 14, 21, 42, 7, 14, 35, 70, 105, 210, 35, 70, 7, 14, 21, 42, 7, 14, 7, 14, 21, 42, 7, 14, 1, 2, 3, 6, 1, 2, 5, 10, 15, 30, 5, 10, 1, 2, 3, 6, 1, 2, 1, 2, 3, 6, 1, 2, 1, 2, 3, 6, 1, 2, 5, 10, 15, 30, 5, 10, 1, 2, 3, 6, 1, 2, 1, 2, 3, 6, 1, 2, 1, 2, 3, 6, 1, 2, 5, 10, 15, 30
Offset: 0
22 has factorial base representation "320" (= A007623(22)), which does not contain any "1". Thus a(22) = 1, as the empty product is 1.
35 has factorial base representation "1121" (= A007623(35)). 1's occur in the following positions, when counted from right, starting with 1: 1, 3 and 4. Thus a(35) = prime(1)*prime(3)*prime(4) = 2*5*7 = 70.
Cf.
A000040,
A001221,
A001222,
A002110,
A005117,
A007623,
A007489,
A048675,
A257261,
A257511,
A275730.
-
nn = 105; m = 1; While[Factorial@ m < nn, m++]; m; Map[Times @@ Map[Prime, Flatten@ Position[#, 1]] &@ Reverse@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, Range[0, nn]] (* Michael De Vlieger, Aug 11 2016, Version 10.2 *)
-
from operator import mul
from sympy import prime
def a007623(n, p=2): return n if nIndranil Ghosh, Jun 19 2017
-
;; Recursive definition using memoizing definec-macro:
(definec (A275732 n) (cond ((zero? (A257261 n)) 1) (else (* (A000040 (A257261 n)) (A275732 (A275730bi n (- (A257261 n) 1)))))))
(define (A275732 n) (let loop ((z 1) (n n)) (let ((y (A257261 n))) (cond ((zero? y) z) (else (loop (* z (A000040 y)) (A275730bi n (- y 1))))))))
;; Code for A275730bi given in A275730.
Original entry on oeis.org
0, 5, 14, 19, 22, 54, 59, 74, 84, 89, 93, 97, 100, 111, 114, 119, 264, 269, 278, 283, 286, 366, 371, 408, 413, 422, 427, 430, 440, 463, 466, 482, 492, 497, 501, 536, 552, 557, 566, 571, 574, 579, 589, 592, 596, 601, 604, 615, 618, 623, 655, 658, 675, 685, 688, 692, 696, 701, 710, 715, 718, 1560, 1565, 1574, 1579, 1582, 1614, 1619, 1634, 1644
Offset: 0
A275730
Square array A(n,d): overwrite with zero the digit at position d from right (indicating radix d+2) in the factorial base representation of n, then convert back to decimal, read by descending antidiagonals as A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), etc.
Original entry on oeis.org
0, 0, 0, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 4, 0, 1, 2, 3, 0, 4, 0, 1, 2, 3, 4, 1, 6, 0, 1, 2, 3, 4, 5, 6, 6, 0, 1, 2, 3, 4, 5, 0, 7, 8, 0, 1, 2, 3, 4, 5, 6, 1, 6, 8, 0, 1, 2, 3, 4, 5, 6, 7, 2, 7, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 3, 6, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 4, 7, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 12, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 13, 14
Offset: 0
Columns 0-4 of rows 0 - 24 of the array:
0, 0, 0, 0, 0, ... [No matter which digit of zero we clear, it stays zero forever]
0, 1, 1, 1, 1 ... [When clearing the least significant digit (pos. 0) of one, "1", we get zero, and clearing any other digit past the most significant digit keeps one as one]
2, 0, 2, 2, 2, ... [Clearing the least significant digit of 2, "10", doesn't affect it, but clearing the digit-1 zeros the whole number].
2, 1, 3, 3, 3, ... [Clearing the least significant factorial base digit of 3 ("11") gives "10", 2, clearing the digit-1 gives "01" = 1, and clearing any digit past the most significant keeps "11" as it is, 3].
4, 0, 4, 4, 4
4, 1, 5, 5, 5
6, 6, 0, 6, 6
6, 7, 1, 7, 7
8, 6, 2, 8, 8
8, 7, 3, 9, 9
10, 6, 4, 10, 10
10, 7, 5, 11, 11
12, 12, 0, 12, 12
12, 13, 1, 13, 13
14, 12, 2, 14, 14
14, 13, 3, 15, 15
16, 12, 4, 16, 16
16, 13, 5, 17, 17
18, 18, 0, 18, 18
18, 19, 1, 19, 19
20, 18, 2, 20, 20
20, 19, 3, 21, 21
22, 18, 4, 22, 22
22, 19, 5, 23, 23
24, 24, 24, 0, 24
...
Showing 1-9 of 9 results.
Comments