login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245485 a(n) = 1 if n is a square, -1 if n is seven times a square, 0 otherwise. 3
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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) is multiplicative with a(p^e) = (-1)^e if p = 7, a(p^e) = (1 + (-1)^e) / 2 otherwise.
G.f.: (theta_3(q) - theta_3(q^7)) / 2 = Sum_{k>0} x^(k^2) - x^(7*k^2).
Dirichlet g.f.: zeta(2*s) * (1 - 7^(-*s)). [corrected by Amiram Eldar, Oct 24 2023]
Sum_{k=1..n} a(k) ~ c*sqrt(n), where c = 1 - 1/sqrt(7) = 0.6220355... . - Amiram Eldar, Oct 24 2023
EXAMPLE
G.f. = q + q^4 - q^7 + q^9 + q^16 + q^25 - q^28 + q^36 + q^49 - q^63 + ...
MATHEMATICA
a[ n_] := Boole[ IntegerQ[ Sqrt[ n]]] - Boole[ IntegerQ[ Sqrt[ 7 n]]];
a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q] - EllipticTheta[ 3, 0, q^7]) / 2, {q, 0, n}];
Table[Which[IntegerQ[Sqrt[n]], 1, IntegerQ[Sqrt[n/7]], -1, True, 0], {n, 120}] (* Harvey P. Dale, May 19 2019 *)
PROG
(PARI) {a(n) = issquare(n) - issquare(7*n)};
(PARI) {a(n) = if( n<1, 0, direuler( p=2, n, if( p==7, 1 - X, 1) / (1 - X^2 ))[n])};
(Magma) Basis( ModularForms( Gamma1(28), 1/2), 86) [2] ;
CROSSREFS
Sequence in context: A024692 A079978 A164704 * A068429 A285208 A260444
KEYWORD
sign,mult
AUTHOR
Michael Somos, Jul 23 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:58 EDT 2024. Contains 371906 sequences. (Running on oeis4.)