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 A245485 #18 Jul 02 2024 14:43:40 %S A245485 1,0,0,1,0,0,-1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,-1,0,0,0,0,0, %T A245485 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,-1,1,0,0,0, %U A245485 0,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,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,-1 %N A245485 a(n) = 1 if n is a square, -1 if n is seven times a square, 0 otherwise. %H A245485 Antti Karttunen, <a href="/A245485/b245485.txt">Table of n, a(n) for n = 1..100489</a> %F A245485 a(n) is multiplicative with a(p^e) = (-1)^e if p = 7, a(p^e) = (1 + (-1)^e) / 2 otherwise. %F A245485 G.f.: (theta_3(q) - theta_3(q^7)) / 2 = Sum_{k>0} x^(k^2) - x^(7*k^2). %F A245485 Dirichlet g.f.: zeta(2*s) * (1 - 7^(-*s)). [corrected by _Amiram Eldar_, Oct 24 2023] %F A245485 Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(7) = 0.6220355... . - _Amiram Eldar_, Oct 24 2023 %e A245485 G.f. = q + q^4 - q^7 + q^9 + q^16 + q^25 - q^28 + q^36 + q^49 - q^63 + ... %t A245485 a[ n_] := Boole[ IntegerQ[ Sqrt[ n]]] - Boole[ IntegerQ[ Sqrt[ 7 n]]]; %t A245485 a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^7]) / 2, {q, 0, n}]; %t A245485 Table[Which[IntegerQ[Sqrt[n]],1,IntegerQ[Sqrt[n/7]],-1,True,0],{n,120}] (* _Harvey P. Dale_, May 19 2019 *) %o A245485 (PARI) {a(n) = issquare(n) - issquare(7*n)}; %o A245485 (PARI) {a(n) = if( n<1, 0, direuler( p=2, n, if( p==7, 1 - X, 1) / (1 - X^2 ))[n])}; %o A245485 (Magma) Basis( ModularForms( Gamma1(28), 1/2), 86) [2] ; %Y A245485 Cf. A214293, A214295, A244612. %K A245485 sign,mult %O A245485 1,1 %A A245485 _Michael Somos_, Jul 23 2014 %E A245485 Data section extended up to a(112) by _Antti Karttunen_, Jul 02 2024