%I #12 Nov 08 2021 04:24:26
%S 1,1,1,2,1,2,1,2,2,2,1,4,1,2,2,4,1,4,1,4,2,2,1,6,2,2,2,4,1,5,1,5,2,2,
%T 2,9,1,2,2,6,1,5,1,4,4,2,1,10,2,4,2,4,1,6,2,6,2,2,1,11,1,2,4,7,2,5,1,
%U 4,2,5,1,15,1,2,4,4,2,5,1,10,4,2,1,11,2
%N Number of factorizations of n that are a twin (x*x) or have an alternating permutation.
%C First differs from A348383 at a(216) = 27, A348383(216) = 28.
%C A factorization of n is a weakly increasing sequence of positive integers > 1 with product n.
%C These permutations are ordered factorizations of n with no adjacent triples (..., x, y, z, ...) where x <= y <= z or x >= y >= z.
%C The version without twins for n > 0 is a(n) + 1 if n is a perfect square; otherwise a(n).
%F For n > 1, a(n) = A335434(n) + A010052(n).
%e The factorizations for n = 4, 12, 24, 30, 36, 48, 60, 64, 72:
%e 4 12 24 30 36 48 60 64 72
%e 2*2 2*6 3*8 5*6 4*9 6*8 2*30 8*8 8*9
%e 3*4 4*6 2*15 6*6 2*24 3*20 2*32 2*36
%e 2*2*3 2*12 3*10 2*18 3*16 4*15 4*16 3*24
%e 2*2*6 2*3*5 3*12 4*12 5*12 2*4*8 4*18
%e 2*3*4 2*2*9 2*3*8 6*10 2*2*16 6*12
%e 2*3*6 2*4*6 2*5*6 2*2*4*4 2*4*9
%e 3*3*4 3*4*4 3*4*5 2*6*6
%e 2*2*3*3 2*2*12 2*2*15 3*3*8
%e 2*2*3*4 2*3*10 3*4*6
%e 2*2*3*5 2*2*18
%e 2*3*12
%e 2*2*3*6
%e 2*3*3*4
%e 2*2*2*3*3
%e The a(270) = 19 factorizations:
%e (2*3*5*9) (5*6*9) (3*90) (270)
%e (3*3*5*6) (2*3*45) (5*54)
%e (2*3*3*15) (2*5*27) (6*45)
%e (2*9*15) (9*30)
%e (3*3*30) (10*27)
%e (3*5*18) (15*18)
%e (3*6*15) (2*135)
%e (3*9*10)
%e Note that (2*3*3*3*5) is separable but has no alternating permutations.
%t facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
%t Table[Length[Select[facs[n],Function[f,Select[Permutations[f],!MatchQ[#,{___,x_,y_,z_,___}/;x<=y<=z||x>=y>=z]&]!={}]]],{n,100}]
%Y Partitions not of this type are counted by A344654, ranked by A344653.
%Y Partitions of this type are counted by A344740, ranked by A344742.
%Y The complement is counted by A347706, without twins A348380.
%Y The case without twins is A348379.
%Y Dominates A348383, the separable case.
%Y A001055 counts factorizations, strict A045778, ordered A074206.
%Y A001250 counts alternating permutations.
%Y A008480 counts permutations of prime indices, strict A335489.
%Y A025047 counts alternating or wiggly compositions, ranked by A345167.
%Y A056239 adds up prime indices, row sums of A112798.
%Y A325534 counts separable partitions, ranked by A335433.
%Y A325535 counts inseparable partitions, ranked by A335448.
%Y A335452 counts anti-run permutations of prime indices, complement A336107.
%Y A339846 counts even-length factorizations.
%Y A339890 counts odd-length factorizations.
%Y Cf. A038548, A049774, A102726, A119620, A128761, A344614, A347437, A347438, A347458, A348381.
%K nonn
%O 1,4
%A _Gus Wiseman_, Oct 15 2021
|