%I #209 Apr 20 2024 04:18:52
%S 1,2,3,6,9,18,5,10,15,30,45,90,25,50,75,150,225,450,125,250,375,750,
%T 1125,2250,625,1250,1875,3750,5625,11250,7,14,21,42,63,126,35,70,105,
%U 210,315,630,175,350,525,1050,1575,3150,875,1750,2625,5250,7875,15750,4375,8750,13125,26250,39375,78750,49,98,147,294,441,882,245,490,735,1470,2205,4410,1225,2450
%N Primorial base exp-function: digits in primorial base representation of n become the exponents of successive prime factors whose product a(n) is.
%C Prime product form of primorial base expansion of n.
%C Sequence is a permutation of A048103. It maps the smallest prime not dividing n to the smallest prime dividing n, that is, A020639(a(n)) = A053669(n) holds for all n >= 1.
%C The sequence satisfies the exponential function identity, a(x + y) = a(x) * a(y), whenever A329041(x,y) = 1, that is, when adding x and y together will not generate any carries in the primorial base. Examples of such pairs of x and y are A328841(n) & A328842(n), and also A328770(n) (when added with itself). - _Antti Karttunen_, Oct 31 2019
%C From _Antti Karttunen_, Feb 18 2022: (Start)
%C The conjecture given in A327969 asks whether applying this function together with the arithmetic derivative (A003415) in some combination or another can eventually transform every positive integer into zero.
%C Another related open question asks whether there are any other numbers than n=6 such that when starting from that n and by iterating with A003415, one eventually reaches a(n). See comments in A351088.
%C This sequence is used in A351255 to list the terms of A099308 in a different order, by the increasing exponents of the successive primes in their prime factorization. (End)
%C From _Bill McEachen_, Oct 15 2022: (Start)
%C From inspection, the least significant decimal digits of a(n) terms form continuous chains of 30 as follows. For n == i (mod 30), i=0..5, there are 6 ordered elements of these 8 {1,2,3,6,9,8,7,4}. Then for n == i (mod 30), i=6..29, there are 12 repeated pairs = {5,0}.
%C Moreover, when the individual elements of any of the possible groups of 6 are transformed via (7*digit) (mod 10), the result matches one of the other 7 groupings (not all 7 may be seen). As example, {1,2,3,6,9,8} transforms to {7,4,1,2,3,6}. (End)
%C The least significant digit of a(n) in base 4 is given by A353486, and in base 6 by A358840. - _Antti Karttunen_, Oct 25 2022, Feb 17 2024
%H Antti Karttunen, <a href="/A276086/b276086.txt">Table of n, a(n) for n = 0..2310</a>
%H Antti Karttunen, <a href="https://github.com/loda-lang/loda-programs/blob/main/oeis/276/A276086.asm">Program in LODA-assembly</a>
%H Antti Karttunen, <a href="/A276086/a276086.asm.txt">Program in LODA-assembly</a> [Cached copy]
%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%F a(0) = 1; for n >= 1, a(n) = A053669(n) * a(A276151(n)) = A053669(n) * a(n-A002110(A276084(n))).
%F a(0) = 1; for n >= 1, a(n) = A053669(n)^A276088(n) * a(A276093(n)).
%F a(n) = A328841(a(n)) + A328842(a(n)) = A328843(n) + A328844(n).
%F a(n) = a(A328841(n)) * a(A328842(n)) = A328571(n) * A328572(n).
%F a(n) = A328475(n) * A328580(n) = A328476(n) + A328580(n).
%F a(A002110(n)) = A000040(n+1). [Maps primorials to primes]
%F a(A143293(n)) = A002110(n+1). [Maps partial sums of primorials to primorials]
%F a(A057588(n)) = A276092(n).
%F a(A276156(n)) = A019565(n).
%F a(A283477(n)) = A324289(n).
%F a(A003415(n)) = A327859(n).
%F Here the text in brackets shows how the right hand side sequence is a function of the primorial base expansion of n:
%F A001221(a(n)) = A267263(n). [Number of nonzero digits]
%F A001222(a(n)) = A276150(n). [Sum of digits]
%F A067029(a(n)) = A276088(n). [The least significant nonzero digit]
%F A071178(a(n)) = A276153(n). [The most significant digit]
%F A061395(a(n)) = A235224(n). [Number of significant digits]
%F A051903(a(n)) = A328114(n). [Largest digit]
%F A055396(a(n)) = A257993(n). [Number of trailing zeros + 1]
%F A257993(a(n)) = A328570(n). [Index of the least significant zero digit]
%F A079067(a(n)) = A328620(n). [Number of nonleading zeros]
%F A056169(a(n)) = A328614(n). [Number of 1-digits]
%F A056170(a(n)) = A328615(n). [Number of digits larger than 1]
%F A277885(a(n)) = A328828(n). [Index of the least significant digit > 1]
%F A134193(a(n)) = A329028(n). [The least missing nonzero digit]
%F A005361(a(n)) = A328581(n). [Product of nonzero digits]
%F A072411(a(n)) = A328582(n). [LCM of nonzero digits]
%F A001055(a(n)) = A317836(n). [Number of carry-free partitions of n in primorial base]
%F Various number theoretical functions applied:
%F A000005(a(n)) = A324655(n). [Number of divisors of a(n)]
%F A000203(a(n)) = A324653(n). [Sum of divisors of a(n)]
%F A000010(a(n)) = A324650(n). [Euler phi applied to a(n)]
%F A023900(a(n)) = A328583(n). [Dirichlet inverse of Euler phi applied to a(n)]
%F A069359(a(n)) = A329029(n). [Sum a(n)/p over primes p dividing a(n)]
%F A003415(a(n)) = A327860(n). [Arithmetic derivative of a(n)]
%F Other identities:
%F A276085(a(n)) = n. [A276085 is a left inverse]
%F A020639(a(n)) = A053669(n). [The smallest prime not dividing n -> the smallest prime dividing n]
%F A046523(a(n)) = A278226(n). [Least number with the same prime signature as a(n)]
%F A246277(a(n)) = A329038(n).
%F A181819(a(n)) = A328835(n).
%F A053669(a(n)) = A326810(n), A326810(a(n)) = A328579(n).
%F A257993(a(n)) = A328570(n), A328570(a(n)) = A328578(n).
%F A328613(a(n)) = A328763(n), A328620(a(n)) = A328766(n).
%F A328828(a(n)) = A328829(n).
%F A053589(a(n)) = A328580(n). [Greatest primorial number which divides a(n)]
%F A276151(a(n)) = A328476(n). [... and that primorial subtracted from a(n)]
%F A111701(a(n)) = A328475(n).
%F A328114(a(n)) = A328389(n). [Greatest digit of primorial base expansion of a(n)]
%F A328389(a(n)) = A328394(n), A328394(a(n)) = A328398(n).
%F A235224(a(n)) = A328404(n), A328405(a(n)) = A328406(n).
%F a(A328625(n)) = A328624(n), a(A328626(n)) = A328627(n). ["Twisted" variants]
%F a(A108951(n)) = A324886(n).
%F a(n) mod n = A328386(n).
%F a(a(n)) = A276087(n), a(a(a(n))) = A328403(n). [2- and 3-fold applications]
%F a(2n+1) = 2 * a(2n). - _Antti Karttunen_, Feb 17 2022
%e For n = 24, which has primorial base representation (see A049345) "400" as 24 = 4*A002110(2) + 0*A002110(1) + 0*A002110(0) = 4*6 + 0*2 + 0*1, thus a(24) = prime(3)^4 * prime(2)^0 * prime(1)^0 = 5^4 = 625.
%e For n = 35 = "1021" as 35 = 1*A002110(3) + 0*A002110(2) + 2*A002110(1) + 1*A002110(0) = 1*30 + 0*6 + 2*2 + 1*1, thus a(35) = prime(4)^1 * prime(2)^2 * prime(1) = 7 * 3*3 * 2 = 126.
%t b = MixedRadix[Reverse@ Prime@ Range@ 12]; Table[Function[k, Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ k, Reverse@ k}]@ IntegerDigits[n, b], {n, 0, 51}] (* _Michael De Vlieger_, Aug 23 2016, Version 10.2 *)
%t f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Prime@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Prime@ Range[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[Times @@ Flatten@ MapIndexed[Prime[#2]^#1 &, Reverse@ f@ n], {n, 0, 73}] (* _Michael De Vlieger_, Aug 30 2016, Pre-Version 10 *)
%t a[n0_] := Module[{m = 1, i = 1, n = n0, p}, While[n > 0, p = Prime[i]; m *= p^Mod[n, p]; n = Quotient[n, p]; i++]; m];
%t Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Dec 01 2021, after _Antti Karttunen_'s Sage code *)
%o (APL, Dyalog Dialect) A276086 ← { P←47 43 41 37 31 29 23 19 17 13 11 7 5 3 2 ⋄ ×/P*¨P⊤⍵ } ⍝ _Antti Karttunen_, Feb 17 2024
%o (PARI) A276086(n) = { my(i=0,m=1,pr=1,nextpr); while((n>0),i=i+1; nextpr = prime(i)*pr; if((n%nextpr),m*=(prime(i)^((n%nextpr)/pr));n-=(n%nextpr));pr=nextpr); m; }; \\ _Antti Karttunen_, May 12 2017
%o (PARI) A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); }; \\ (Better than above one, avoids unnecessary construction of primorials). - _Antti Karttunen_, Oct 14 2019
%o (Scheme) (define (A276086 n) (let loop ((n n) (t 1) (i 1)) (if (zero? n) t (let* ((p (A000040 i)) (d (modulo n p))) (loop (/ (- n d) p) (* t (expt p d)) (+ 1 i))))))
%o (Scheme) (definec (A276086 n) (if (zero? n) 1 (* (expt (A053669 n) (A276088 n)) (A276086 (A276093 n))))) ;; Needs macro definec from http://oeis.org/wiki/Memoization#Scheme
%o (Scheme) (definec (A276086 n) (if (zero? n) 1 (* (A053669 n) (A276086 (- n (A002110 (A276084 n))))))) ;; Needs macro definec from http://oeis.org/wiki/Memoization#Scheme
%o (Python)
%o from sympy import prime
%o def a(n):
%o i=0
%o m=pr=1
%o while n>0:
%o i+=1
%o N=prime(i)*pr
%o if n%N!=0:
%o m*=(prime(i)**((n%N)/pr))
%o n-=n%N
%o pr=N
%o return m # _Indranil Ghosh_, May 12 2017, after _Antti Karttunen_'s PARI code
%o (Sage)
%o def A276086(n):
%o m=1
%o i=1
%o while n>0:
%o p = sloane.A000040(i)
%o m *= (p**(n%p))
%o n = floor(n/p)
%o i += 1
%o return (m)
%o # _Antti Karttunen_, Oct 14 2019, after _Indranil Ghosh_'s Python code above, and my own leaner PARI code from Oct 14 2019. This avoids unnecessary construction of primorials.
%o (Python)
%o from sympy import nextprime
%o def a(n):
%o m, p = 1, 2
%o while n > 0:
%o n, r = divmod(n, p)
%o m *= p**r
%o p = nextprime(p)
%o return m
%o print([a(n) for n in range(74)]) # _Peter Luschny_, Apr 20 2024
%Y Cf. A276085 (a left inverse) and also A276087, A328403.
%Y Cf. A000040, A001221, A001222, A002110, A020639, A049345, A053669, A055396, A057588, A071178, A143293, A257993, A267263, A276084, A276088, A276092, A276093, A276147, A276150, A276151, A276153, A276156, A283477, A324198 (= gcd(n, a(n))), A328584 (= lcm(n, a(n))), A324646, A324289, A328386, A328403, A328475, A328571, A328572, A328578, A328612, A328613, A328620, A328624, A328627, A328763, A328766, A328828, A328835, A328841, A328842, A328843, A328844, A329041, A324580 [= n*a(n)], A324895 (largest proper divisor of a(n)), A351252, A353486 (reduced modulo 4), A358840 (modulo 6), A353489, A353516.
%Y Cf. A048103 (terms sorted into ascending order), A100716 (natural numbers not present in this sequence).
%Y Cf. A278226 (associated filter-sequence), A286626 (and its rgs-version), A328477.
%Y Cf. A328316 (iterates started from zero).
%Y Cf. A327858, A327859, A327860, A327963, A328097, A328098, A328099, A328110, A328112, A328382 for various combinations with arithmetic derivative (A003415).
%Y Cf. also A327167, A329037.
%Y Cf. A019565 and A054842 for base-2 and base-10 analogs and A276076 for the analogous "factorial base exp-function", from which this differs for the first time at n=24, where a(24)=625 while A276076(24)=7.
%Y Cf. A327969, A351088, A351458 for sequences with conjectures involving this sequence.
%K nonn,base,look
%O 0,2
%A _Antti Karttunen_, Aug 21 2016
%E Name edited and new link-formulas added by _Antti Karttunen_, Oct 29 2019
%E Name changed again by _Antti Karttunen_, Feb 05 2022