login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138806 Expansion of (theta_3(q) * theta_3(q^27) + theta_2(q) * theta_2(q^27) - 1) / 2 in powers of q. 3
1, 0, 0, 1, 0, 0, 2, 0, 3, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 2, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 6, 1, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

Half the number of integer solutions to x^2 + x*y + 7*y^2 = n. - Jianing Song, Nov 20 2019

LINKS

Table of n, a(n) for n=1..105.

FORMULA

a(n) is multiplicative and a(3^e) = 3 if e>1, a(p^e) = e+1 if p == 1 (mod 6), a(p^e) = (1 + (-1)^e) / 2 if p == 5 (mod 6).

a(3*n + 2) = a(4*n + 2) = 0.

G.f.: (Sum_{i,j} x^(i*i + i*j + 7*j*j) - 1) / 2.

A138805(n) = 2 * a(n) unless n=0. A033687(n) = a(3*n + 1). A097195(n) = a(6*n + 1). A123884(n) = a(12*n + 1). 2 * A121361(n) = a(12*n + 7).

EXAMPLE

q + q^4 + 2*q^7 + 3*q^9 + 2*q^13 + q^16 + 2*q^19 + q^25 + 3*q^27 + ...

PROG

(PARI) {a(n) = if( n<1, 0, if( n%3 == 2, 0, if( n%3==1, sumdiv(n, d, kronecker(-3, d)), if( n%9==0, 3 * sumdiv(n/9, d, kronecker(-3, d))))))}

(PARI) {a(n) = if( n<1, 0, sumdiv(n, d, kronecker(-3, d)) - if( n%3==0, sumdiv(n/3, d, [0, 1, -1, -3, 1, -1, 3, 1, -1][d%9+1])))}

(PARI) {a(n) = if( n<1, 0, qfrep([2, 1; 1, 14], n, 1)[n])}

CROSSREFS

Cf. A138805 (number of integer solutions to x^2 + x*y + 7*y^2 = n).

Cf. A033687, A097195, A123884, A121361.

Similar sequences: A096936, A113406, A110399.

Sequence in context: A116864 A255308 A079302 * A181105 A142971 A104117

Adjacent sequences:  A138803 A138804 A138805 * A138807 A138808 A138809

KEYWORD

nonn,mult

AUTHOR

Michael Somos, Mar 30 2008

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 25 22:37 EST 2021. Contains 341618 sequences. (Running on oeis4.)