login
A362426
Number of compositions (ordered partitions) of n into 2 perfect powers (A001597).
0
0, 0, 1, 0, 0, 2, 0, 0, 1, 2, 2, 0, 2, 2, 0, 0, 1, 4, 1, 0, 2, 0, 0, 0, 2, 2, 2, 0, 2, 2, 0, 2, 1, 4, 2, 2, 4, 2, 0, 0, 4, 4, 0, 2, 2, 2, 0, 0, 2, 0, 3, 0, 4, 2, 1, 0, 0, 4, 2, 2, 0, 2, 0, 2, 1, 4, 0, 0, 4, 0, 0, 0, 3, 2, 2, 0, 2, 0, 0, 0, 2, 2, 2, 0, 0, 4, 0, 0, 0, 4, 2, 2
OFFSET
0,6
LINKS
Eric Weisstein's World of Mathematics, Perfect Power.
MATHEMATICA
perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[;; , 2]] > 1; a[n_] := Total[Multinomial @@ Tally[#][[;; , 2]] & /@ Select[IntegerPartitions[n, {2}], AllTrue[#, perfectPowerQ] &]]; Array[a, 100, 0] (* Amiram Eldar, May 05 2023 *)
CROSSREFS
Cf. A001597.
Sequence in context: A325406 A360675 A257900 * A039971 A205593 A277937
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 19 2023
STATUS
approved