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.
%I A197870 #22 Feb 16 2025 08:33:15 %S A197870 1,-1,0,1,0,0,-1,0,0,0,1,0,0,0,0,-1,0,0,0,0,0,1,0,0,0,0,0,0,-1,0,0,0, %T A197870 0,0,0,0,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0, %U A197870 -1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0 %N A197870 Expansion of false theta series variation of Ramanujan theta function psi(x). %C A197870 Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). %H A197870 G. C. Greubel, <a href="/A197870/b197870.txt">Table of n, a(n) for n = 0..5000</a> %H A197870 Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a> %H A197870 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a> %F A197870 G.f.: Sum_{k>=0} (-1)^k * x^(k*(k+1)/2). |a(n)| = A010054(n). %F A197870 G.f.: G(0) where G(k) = 1 - q^(k+1)*G(k+1) = 1 - q*(1 - q^2*(1 - q^3*(1 - q^4*(1 - ...)))). - _Joerg Arndt_, Jun 29 2013 %F A197870 G.f.: Sum_{k>=0} a(k) * x^(3*k) = 1 / (1+x) + x*(1-x) / ((1+x)*(1+x^2)*(1+x^3)) + x^2*(1-x)*(1-x^3) / ((1+x)*(1+x^2)*...*(1+x^5)) + ... - _Michael Somos_, Jul 21 2014 %e A197870 G.f. = 1 - x + x^3 - x^6 + x^10 - x^15 + x^21 - x^28 + x^36 - x^45 + x^55 + ... %e A197870 G.f. = q - q^9 + q^25 - q^49 + q^81 - q^121 + q^169 - q^225 + q^289 - q^361 + ... %t A197870 a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ (-1)^k x^(k (k + 1)/2), {k, 0, (Sqrt[8 n + 1] - 1)/2}], {x, 0, n}]]; (* _Michael Somos_, Jul 21 2014 *) %t A197870 a[n_] := Module[{r, k}, r = Reduce[k >= 0 && 2n == k(k+1), k, Integers]; If[r === False, 0, (-1)^r[[2]] ] ]; Table[a[n], {n, 0, 104}] (* _Jean-François Alcover_, Nov 27 2016 *) %o A197870 (PARI) {a(n) = local(x); if( issquare( 8*n + 1, &x), (-1)^(x\2), 0)}; %Y A197870 Cf. A010054. %Y A197870 Cf. A005169 (g.f.: G(0), where G(k) = 1/( 1 - q^(k+1)*G(k+1) ) ). %K A197870 sign %O A197870 0,1 %A A197870 _Michael Somos_, Oct 18 2011