login
A275732
One-based positions of 1-digits in the factorial base representation of n are converted to primes with those indices, then multiplied together.
9
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,2
COMMENTS
All terms are squarefree (A005117), and each squarefree number occurs an infinitely many times.
FORMULA
If A257261(n) = 0, then a(n) = 1, otherwise a(n) = A000040(A257261(n)) * a(A275730(n, A257261(n)-1)). [Here A275730(n,p) is a bivariate function that "clears" the digit at zero-based position p in the factorial base representation of n].
Other identities and observations. For all n >= 0:
a(A007489(n)) = A002110(n).
a(A255411(n)) = 1.
A001221(a(n)) = A001222(a(n)) = A257511(n).
A048675(a(n)) = A275736(n).
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(Scheme)
;; 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.
(Python)
from operator import mul
from sympy import prime
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a(n):
x=str(a007623(n))[::-1]
return 1 if n==0 or "1" not in x else reduce(mul, [prime(i + 1) for i in range(len(x)) if x[i]=='1'])
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 19 2017
CROSSREFS
Cf. A255411 (indices of ones).
Can be used to compute A275733 and A275734.
Cf. also to A275736.
Sequence in context: A226871 A178483 A133031 * A200594 A319191 A124795
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 08 2016
STATUS
approved