|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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:
|
|
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:
(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'])
|
|
CROSSREFS
|
Cf. A000040, A001221, A001222, A002110, A005117, A007623, A007489, A048675, A257261, A257511, A275730.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|