0, 1, 1, 2, 1, 1, 1, 2, 2, 3, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 3, 2, 2, 2, 3, 3, 4, 3, 3, 2, 3, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 1, 2, 2, 3, 2, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 1, 2, 1, 2, 2, 2, 2, 3, 2, 3, 3, 3, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1
Offset: 0
For n=23 ("321" in factorial base representation, A007623), all the digits are maximal for their positions (they occur on the "maximal slope"), thus there is only one distinct digit slope present and a(23)=1. Also, for the 23rd permutation in the ordering A060117, [2341], there is just one drop, as p[4] = 1 < 4.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the maximal slope, while the most significant 1 is on the "sub-sub-sub-maximal", thus there are two occupied slopes in total, and a(29) = 2. In the 29th permutation of A060117, [23154], there are two drops as p[3] = 1 < 3 and p[5] = 4 < 5.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the submaximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus there are three occupied slopes in total, and a(37) = 3. In the 37th permutation of A060117, [51324], there are three drops at indices 2, 4 and 5.
A275734
Prime-factorization representations of "factorial base slope polynomials": a(0) = 1; for n >= 1, a(n) = A275732(n) * a(A257684(n)).
Original entry on oeis.org
1, 2, 3, 6, 2, 4, 5, 10, 15, 30, 10, 20, 3, 6, 9, 18, 6, 12, 2, 4, 6, 12, 4, 8, 7, 14, 21, 42, 14, 28, 35, 70, 105, 210, 70, 140, 21, 42, 63, 126, 42, 84, 14, 28, 42, 84, 28, 56, 5, 10, 15, 30, 10, 20, 25, 50, 75, 150, 50, 100, 15, 30, 45, 90, 30, 60, 10, 20, 30, 60, 20, 40, 3, 6, 9, 18, 6, 12, 15, 30, 45, 90, 30, 60, 9, 18, 27
Offset: 0
For n=23 ("321" in factorial base representation, A007623), all three nonzero digits are maximal for their positions (they all occur on "maximal slope"), thus a(23) = prime(1)^3 = 2^3 = 8.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the "maximal slope", while the most significant 1 is on the "sub-sub-sub-maximal", thus a(29) = prime(1)^2 * prime(4)^1 = 2*7 = 28.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the sub-maximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus a(37) = prime(1) * prime(2) * prime(4) = 2*3*7 = 42.
For n=55 ("2101"), the least significant 1 is on the maximal slope, and the digits "21" at the beginning are together on the sub-sub-maximal slope (as they are both two less than the maximal digit values 4 and 3 allowed in those positions), thus a(55) = prime(1)^1 * prime(3)^2 = 2*25 = 50.
Cf.
A001221,
A001222,
A002110,
A007489,
A007814,
A048675,
A051903,
A056169,
A056170,
A060130,
A060502,
A225901.
Cf.
A275804 (indices of squarefree terms),
A275805 (of terms not squarefree).
-
from operator import mul
from sympy import prime, factorial as f
def a007623(n, p=2): return n if n0 else '0' for i in x)[::-1]
return 0 if n==1 else sum(int(y[i])*f(i + 1) for i in range(len(y)))
def a(n): return 1 if n==0 else a275732(n)*a(a257684(n))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 19 2017
A257511
Number of 1's in factorial base representation of n (A007623).
Original entry on oeis.org
0, 1, 1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 2, 3, 3, 4, 2, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 3, 1, 2, 0, 1, 1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 2, 3, 1, 2, 0, 1, 1, 2, 0, 1, 0, 1, 1, 2, 0, 1, 1
Offset: 0
Cf.
A001221,
A007623,
A007814,
A034968,
A056169,
A060130,
A225901,
A257687,
A265333,
A275732,
A275735,
A260736,
A276076.
-
factBaseIntDs[n_] := Module[{m, i, len, dList, currDigit}, i = 1; While[n > i!, i++]; m = n; len = i; dList = Table[0, {len}]; Do[currDigit = 0; While[m >= j!, m = m - j!; currDigit++]; dList[[len - j + 1]] = currDigit, {j, i, 1, -1}]; If[dList[[1]] == 0, dList = Drop[dList, 1]]; dList]; s = Table[FromDigits[factBaseIntDs@ n], {n, 0, 120}];
First@ DigitCount[#] & /@ s (* Michael De Vlieger, Apr 27 2015, after Alonso del Arte at A007623 *)
nn = 120; b = Module[{m = 1}, While[Factorial@ m < nn, m++]; MixedRadix[Reverse@ Range[2, m]]]; Table[Count[IntegerDigits[n, b], 1], {n, 0, nn}] (* Michael De Vlieger, Aug 29 2016, Version 10.2 *)
-
(define (A257511 n) (let loop ((n n) (i 2) (s 0)) (cond ((zero? n) s) (else (loop (floor->exact (/ n i)) (+ 1 i) (+ s (if (= 1 (modulo n i)) 1 0)))))))
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).
Original entry on oeis.org
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
Offset: 0
Cf.
A000120,
A000142,
A001563,
A030308,
A059590,
A060130,
A260736,
A225901,
A255411,
A275959,
A276082,
A276083,
A276090,
A276326,
A276328,
A276336,
A276337,
A276339,
A276340.
-
Table[Total[Times @@@ Transpose@ {Map[# #! &, Range@ Length@ #], Reverse@ #}] &@ IntegerDigits[n, 2], {n, 64}] (* Michael De Vlieger, Aug 31 2016 *)
-
from sympy import factorial as f
def a007623(n, p=2): return n if n0 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))
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 20 2017
-
;; 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:
(definec (A276091 n) (cond ((zero? n) n) ((even? n) (A255411 (A276091 (/ n 2)))) (else (+ 1 (A255411 (A276091 (/ (- n 1) 2)))))))
;; Alternatively, we can use A276340 in place of A255411:
(definec (A276091 n) (cond ((zero? n) n) ((even? n) (A276340 (A276091 (/ n 2)))) (else (+ 1 (A276340 (A276091 (/ (- n 1) 2)))))))
Name changed (to emphasize the functional nature of the sequence) with the original definition moved to the comments by
Antti Karttunen, Sep 01 2016
A275811
Number of nonzero digits on a maximally occupied slope of factorial base representation of n: a(n) = A051903(A275734(n)). See comments for the definition.
Original entry on oeis.org
0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 3, 3, 2, 2, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 3, 4, 1
Offset: 0
For n=23 ("321" in factorial base representation, A007623), all three nonzero digits are maximal for their positions (they all occur on "maximal slope"), thus the "maximal slope" is also the "maximally occupied slope" (as there are no other occupied slopes present), and a(23) = 3.
For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the "maximal slope", while the most significant 1 is on the "sub-sub-sub-maximal", thus here the "maximal slope" is also the "maximally occupied slope" (with 2 nonzero digits present), and a(29) = 2.
For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the sub-maximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus there are three occupied slopes in total, all with just one nonzero digit present, and a(37) = 1.
For n=55 ("2101"), the least significant 1 is on the maximal slope, and the digits "21" at the beginning are together on the sub-sub-maximal slope (as they are both two less than the maximal digit values 4 and 3 allowed in those positions), thus here the sub-sub-maximal slope is the "maximally occupied slope" with its two occupiers, and a(55) = 2.
Cf.
A275804 (gives the indices of 0 and 1's),
A275805 (gives the indices of terms > 1).
-
from sympy import prime, factorint
from operator import mul
from functools import reduce
from sympy import factorial as f
def a051903(n): return 0 if n==1 else max(factorint(n).values())
def a007623(n, p=2): return n if n0 else '0' for i in x])[::-1]
return 0 if n==1 else sum([int(y[i])*f(i + 1) for i in range(len(y))])
def a275734(n): return 1 if n==0 else a275732(n)*a275734(a257684(n))
def a(n): return 0 if n==0 else a051903(a275734(n))
print([a(n) for n in range(201)]) # Indranil Ghosh, Jun 20 2017
Signs in comment corrected and clarification added by
Antti Karttunen, Aug 16 2016
A276951
Index of column where n is located in array A276953 (equally: row in A276955).
Original entry on oeis.org
0, 1, 1, 2, 3, 4, 1, 5, 2, 6, 7, 8, 3, 9, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 19, 5, 20, 21, 22, 2, 23, 6, 24, 25, 26, 7, 27, 8, 28, 29, 30, 31, 32, 33, 34, 35, 36, 3, 37, 9, 38, 39, 40, 4, 41, 10, 42, 43, 44, 11, 45, 12, 46, 47, 48, 49, 50, 51, 52, 53, 54, 13, 55, 14, 56, 57, 58, 15, 59, 16, 60, 61, 62, 17, 63, 18, 64
Offset: 0
Comments