OFFSET
0,2
COMMENTS
All terms are squarefree (A005117), and each squarefree number occurs an infinitely many times.
LINKS
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(A255411(n)) = 1.
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
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 08 2016
STATUS
approved