login
Prime-factorization representations of "factorial base slope polynomials": a(0) = 1; for n >= 1, a(n) = A275732(n) * a(A257684(n)).
21

%I #32 Mar 12 2021 07:52:12

%S 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,

%T 14,28,35,70,105,210,70,140,21,42,63,126,42,84,14,28,42,84,28,56,5,10,

%U 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

%N Prime-factorization representations of "factorial base slope polynomials": a(0) = 1; for n >= 1, a(n) = A275732(n) * a(A257684(n)).

%C These are prime-factorization representations of single-variable polynomials where the coefficient of term x^(k-1) (encoded as the exponent of prime(k) in the factorization of n) is equal to the number of nonzero digits that occur on the slope (k-1) levels below the "maximal slope" in the factorial base representation of n. See A275811 for the definition of the "digit slopes" in this context.

%H Antti Karttunen, <a href="/A275734/b275734.txt">Table of n, a(n) for n = 0..40320</a>

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

%F a(0) = 1; for n >= 1, a(n) = A275732(n) * a(A257684(n)).

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

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

%F a(A007489(n)) = A002110(n).

%F A001221(a(n)) = A060502(n).

%F A001222(a(n)) = A060130(n).

%F A007814(a(n)) = A260736(n).

%F A051903(a(n)) = A275811(n).

%F A048675(a(n)) = A275728(n).

%F A248663(a(n)) = A275808(n).

%F A056169(a(n)) = A275946(n).

%F A056170(a(n)) = A275947(n).

%F A275812(a(n)) = A275962(n).

%e 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.

%e 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.

%e 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.

%e 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.

%o (Scheme, with memoization-macro definec)

%o (definec (A275734 n) (if (zero? n) 1 (* (A275732 n) (A275734 (A257684 n)))))

%o (Python)

%o from operator import mul

%o from sympy import prime, factorial as f

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

%o def a275732(n):

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

%o return 1 if n==0 or x.count("1")==0 else reduce(mul, [prime(i + 1) for i in range(len(x)) if x[i]=='1'])

%o def a257684(n):

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

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

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

%o def a(n): return 1 if n==0 else a275732(n)*a(a257684(n))

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

%Y Cf. A001221, A001222, A002110, A007489, A007814, A048675, A051903, A056169, A056170, A060130, A060502, A225901.

%Y Cf. A257684, A275732.

%Y Cf. A275811.

%Y Cf. A260736, A275728, A275808, A275812, A275946, A275947, A275962.

%Y Cf. A275804 (indices of squarefree terms), A275805 (of terms not squarefree).

%Y Cf. also A275725, A275733, A275735, A276076 for other such prime factorization encodings of A060117/A060118-related polynomials.

%K nonn,base

%O 0,2

%A _Antti Karttunen_, Aug 08 2016