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.

A284345 Number of partitions of n into squares dividing n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 4, 1, 1, 1, 6, 1, 3, 1, 6, 1, 1, 1, 7, 2, 1, 4, 8, 1, 1, 1, 15, 1, 1, 1, 27, 1, 1, 1, 11, 1, 1, 1, 12, 6, 1, 1, 28, 2, 3, 1, 14, 1, 7, 1, 15, 1, 1, 1, 16, 1, 1, 8, 46, 1, 1, 1, 18, 1, 1, 1, 114, 1, 1, 4, 20, 1, 1, 1, 66, 11, 1, 1, 22, 1, 1, 1, 23, 1, 11, 1, 24, 1, 1, 1, 91, 1, 3, 12, 67
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 25 2017

Keywords

Examples

			a(8) = 3 because 8 has 4 divisors {1, 2, 4, 8} among which 2 are squares {1, 4} therefore we have [4, 4], [4, 1, 1, 1, 1] and [1, 1, 1, 1, 1, 1, 1, 1].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; local b, l; l, b:=
          sort(select(issqr, [divisors(n)[]])),
          proc(m, i) option remember; `if`(m=0, 1, `if`(i<1, 0,
            b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i))))
          end; b(n, nops(l))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 30 2017
  • Mathematica
    Join[{1}, Table[d = Divisors[n]; Coefficient[Series[Product[1/(1 - Boole[Mod[DivisorSigma[0, d[[k]]], 2] == 1] x^d[[k]]), {k, Length[d]}], {x, 0, n}], x, n], {n, 1, 100}]]

Formula

a(n) = [x^n] Product_{d^2|n} 1/(1 - x^(d^2)).
a(n) = 1 if n is a squarefree.
a(n) = 2 if n is a square of prime.