%I #14 Nov 30 2022 16:10:54
%S 1,1,1,2,1,2,1,1,1,1,1,2,1,2,1,2,1,3,1,1,1,1,1,5,1,2,1,4,1,3,1,1,1,1,
%T 1,5,1,2,1,2,1,4,1,1,1,1,1,5,1,2,1,4,1,4,1,2,1,1,1,5,1,2,1,3,1,3,1,1,
%U 1,2,1,9,1,2,1,4,1,4,1,1,1,1,1,5,1,2,1,2,1,5,1,1,1,1,1,8,1,3,1,4,1,3,1,2,1
%N Number of factorizations of n where the sum of the factors is carryfree when the addition is done in the primorial base.
%H Antti Karttunen, <a href="/A358236/b358236.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%F For all n >= 1, a(2n-1) = 1, a(4n-2) = A358233(4n-2).
%F For all n >= 1, A358233(n) <= a(n) <= A001055(n).
%e 36 has in total 9 = A001055(36) factorizations:
%e factors in decimal in primorial base Do they generate carries when summed?
%e [3, 3, 2, 2] [11, 11, 10, 10] Yes, as A049345(3+3+2+2) = "120".
%e [4, 3, 3] [20, 11, 11] Yes, in the least significant place.
%e [6, 3, 2] [100, 11, 10] No, 6+3+2 = 11 = "121".
%e [6, 6] [100, 100] No, 6+6 = 12 = "200".
%e [9, 2, 2] [111, 10, 10] Yes, in the second place from right.
%e [9, 4] [111, 20] Ditto.
%e [12, 3] [200, 11] No, 12+3 = 15 = "211".
%e [18, 2] [300, 10] No, 18+2 = 20 = "310".
%e [36] [1100] No, as a single factor never does.
%e Thus only five of the sums are carryfree, and a(36) = 5.
%o (PARI)
%o A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
%o A327936(n) = { my(f = factor(n)); for(k=1, #f~, f[k,2] = (f[k,2]>=f[k,1])); factorback(f); };
%o A358236(n, m=n, facs=List([])) = if(1==n, 1==A327936(factorback(apply(A276086,Vec(facs)))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A358236(n/d, d, newfacs))); (s));
%Y Cf. A001055, A049345, A276086, A327936, A358233.
%Y Cf. also A317836.
%K nonn,base
%O 1,4
%A _Antti Karttunen_, Nov 29 2022
|