Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

squares_r function

How many ways a whole number is a sum of a given count of squares, counting order and signs.

How to write it

squares_r(d, n)

d
How many squares. Takes a whole number.
n
The number to write as a sum. Takes a whole number.

Examples

  • squares_r⁡(2,5)=8\displaystyle \operatorname{squares\_r}(2, 5) = 8
    squares_r(2, 5)

    In the solver, squares_r(2, 5) gives 8.

    Open in the solver
  • stirling_s1

    Stirling number of the first kind, with sign.

  • solve_congruence

    Solve a congruence for a variable.

  • stirling_s2

    Stirling number of the second kind: the ways to split n items into k groups.

  • primitive_root

    A primitive root of a prime: a number whose powers cover all the nonzero residues.

  • subfactorial

    Subfactorial: how many ways to reorder n items so none stays in place.

  • prime_pi

    How many primes are at most a number.