login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #27 Mar 28 2021 04:07:43

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

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

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

%N One-based positions of 1-digits in the factorial base representation of n are converted to primes with those indices, then multiplied together.

%C All terms are squarefree (A005117), and each squarefree number occurs an infinitely many times.

%H Antti Karttunen, <a href="/A275732/b275732.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 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].

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

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

%F a(A255411(n)) = 1.

%F A001221(a(n)) = A001222(a(n)) = A257511(n).

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

%e 22 has factorial base representation "320" (= A007623(22)), which does not contain any "1". Thus a(22) = 1, as the empty product is 1.

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

%t 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 *)

%o (Scheme)

%o ;; Recursive definition using memoizing definec-macro:

%o (definec (A275732 n) (cond ((zero? (A257261 n)) 1) (else (* (A000040 (A257261 n)) (A275732 (A275730bi n (- (A257261 n) 1)))))))

%o (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))))))))

%o ;; Code for A275730bi given in A275730.

%o (Python)

%o from operator import mul

%o from sympy import prime

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

%o def a(n):

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

%o 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'])

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

%Y Cf. A000040, A001221, A001222, A002110, A005117, A007623, A007489, A048675, A257261, A257511, A275730.

%Y Cf. A255411 (indices of ones).

%Y Can be used to compute A275733 and A275734.

%Y Cf. also to A275736.

%K nonn,base

%O 0,2

%A _Antti Karttunen_, Aug 08 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)