cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 19 2023

Keywords

Crossrefs

Cf. A001597.

Programs

  • 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 *)