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.

A161528 Expansion of the q-series Sum_{n >= 0} (-1)^nq^(n(n+1)/2)(1-q)(1-q^2)...(1-q^n)/((1-q^(n+1))(1-q^(n+2))...(1-q^(2n+1))).

Original entry on oeis.org

1, 0, 2, 1, 0, 0, 2, 1, 2, 0, 0, 0, 2, 0, 2, 2, 1, 0, 0, 0, 2, 0, 0, 2, 3, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 2, 2, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, 1, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 0, 4, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 2, 2, 1, 0, 4, 0, 2, 0, 0, 0, 0, 0, 2, 2
Offset: 0

Views

Author

Jeremy Lovejoy, Jun 12 2009

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[MemberQ[{2, 3}, Mod[p, 5]], (1 + (-1)^e)/2, e+1]; f[5, e_] := 1; a[0] = 1; a[n_] := Times @@ f @@@ FactorInteger[5*n+1]; Array[a, 100, 0] (* Amiram Eldar, Jan 11 2025 *)
  • PARI
    a(n) = {my(f = factor(5*n+1)); prod(i = 1, #f~, if(f[i, 1] == 5, 1, if(f[i, 1] % 5 == 2 || f[i, 1] % 5 == 3, (1 + (-1)^f[i, 2])/2, f[i, 2] + 1)));} \\ Amiram Eldar, Jan 11 2025

Formula

a(n) = A035187(5n+1).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4*log(phi)/sqrt(5) = 0.860817..., where phi is the golden ratio (A001622) . - Amiram Eldar, Jan 11 2025