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!)
A362426 Number of compositions (ordered partitions) of n into 2 perfect powers (A001597). 0

%I #7 May 13 2023 17:13:23

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

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

%U 4,0,0,0,3,2,2,0,2,0,0,0,2,2,2,0,0,4,0,0,0,4,2,2

%N Number of compositions (ordered partitions) of n into 2 perfect powers (A001597).

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PerfectPower.html">Perfect Power</a>.

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

%Y Cf. A001597.

%K nonn

%O 0,6

%A _Ilya Gutkovskiy_, Apr 19 2023

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 September 9 21:41 EDT 2024. Contains 375765 sequences. (Running on oeis4.)