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.

Showing 1-10 of 34 results. Next

A002324 Number of divisors of n == 1 (mod 3) minus number of divisors of n == 2 (mod 3).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Coefficients of Dedekind zeta function for the quadratic number field of discriminant -3. See Formula section for the general expression. - N. J. A. Sloane, Mar 22 2022
Coefficients in expansion of Dirichlet series Product_p (1 - (Kronecker(m,p) + 1)*p^(-s) + Kronecker(m,p) * p^(-2s))^(-1) for m = -3.
(Number of points of norm n in hexagonal lattice) / 6, n>0.
The hexagonal lattice is the familiar 2-dimensional lattice (A_2) in which each point has 6 neighbors. This is sometimes called the triangular lattice.
The first occurrence of a(n) = 1, 2, 3, 4,... is at n= 1, 7, 49, 91, 2401, 637, ... as tabulated in A343771. - R. J. Mathar, Sep 21 2024

Examples

			G.f. = x + x^3 + x^4 + 2*x^7 + x^9 + x^12 + 2*x^13 + x^16 + 2*x^19 + 2*x^21 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 112, first display.
  • J. W. L. Glaisher, Table of the excess of the number of (3k+1)-divisors of a number over the number of (3k+2)-divisors, Messenger Math., 31 (1901), 64-72.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.

Programs

  • Haskell
    a002324 n = a001817 n - a001822 n  -- Reinhard Zumkeller, Nov 26 2011
    
  • Maple
    A002324 := proc(n)
        local a,pe,p,e;
        a :=1 ;
        for pe in ifactors(n)[2] do
            p := op(1,pe) ;
            e := op(2,pe) ;
            if p = 3 then
                ;
            elif modp(p,3) = 1 then
                a := a*(e+1) ;
            else
                a := a*(1+(-1)^e)/2 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A002324(n),n=1..100) ; # R. J. Mathar, Sep 21 2024
  • Mathematica
    dn12[n_]:=Module[{dn=Divisors[n]},Count[dn,?(Mod[#,3]==1&)]-Count[ dn,?(Mod[#,3]==2&)]]; dn12/@Range[120]  (* Harvey P. Dale, Apr 26 2011 *)
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, KroneckerSymbol[ -3, #] &]]; (* Michael Somos, Aug 24 2014 *)
    Table[DirichletConvolve[DirichletCharacter[3,2,m],1,m,n],{n,1,30}] (* Steven Foster Clark, May 29 2019 *)
    f[3, p_] := 1; f[p_, e_] := If[Mod[p, 3] == 1, e+1, (1+(-1)^e)/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 17 2020 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=1, n, x^k / (1 + x^k + x^(2*k)), x * O(x^n)), n))}; \\ Michael Somos
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, (d%3==1) - (d%3==2)))};
    
  • PARI
    {a(n) = local(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], if( p=A[k,1], e=A[k,2]; if( p==3, 1, if( p%3==1, e+1, !(e%2))))))}; \\ Michael Somos, May 20 2005
    
  • PARI
    {a(n) = if( n<1, 0, qfrep([2,1; 1,2], n, 1)[n] / 3)}; \\ Michael Somos, Jun 05 2005
    
  • PARI
    {a(n) = if( n<1, 0, direuler(p=2, n, 1 / (1 - X) / (1 - kronecker(-3, p)*X))[n])}; \\ Michael Somos, Jun 05 2005
    
  • PARI
    my(B=bnfinit(x^2+x+1)); vector(100,n,#bnfisintnorm(B,n)) \\ Joerg Arndt, Jun 01 2024
    
  • Python
    from math import prod
    from sympy import factorint
    def A002324(n): return prod(e+1 if p%3==1 else int(not e&1) for p, e in factorint(n).items() if p != 3) # Chai Wah Wu, Nov 17 2022

Formula

From N. J. A. Sloane, Mar 22 2022 (Start):
The Dedekind zeta function DZ_K(s) for a quadratic field K of discriminant D is as follows.
Here m is defined by K = Q(sqrt(m)) (so m=D/4 if D is a multiple of 4, otherwise m=D).
DZ_K(s) is the product of three terms:
(a) Product_{odd primes p | D} 1/(1-1/p^s)
(b) Product_{odd primes p such that (D|p) = -1} 1/(1-1/p^(2s))
(c) Product_{odd primes p such that (D|p) = 1} 1/(1-1/p^s)^2
and if m is
0,1,2,3,4,5,6,7 mod 8, the prime 2 is to be included in term
-,c,a,a,-,b,a,a, respectively.
For Maple (and PARI) implementations, see link. (End)
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - 3*v^2 + 4*w^2 - 2*u*w + w - v. - Michael Somos, Jul 20 2004
Has a nice Dirichlet series expansion, see PARI line.
G.f.: Sum_{k>0} x^k/(1+x^k+x^(2*k)). - Vladeta Jovovic, Dec 16 2002
a(3*n + 2) = 0, a(3*n) = a(n), a(3*n + 1) = A033687(n). - Michael Somos, Apr 04 2003
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = (u1 - u3)*(u3 - u6) - (u2 - u6)^2. - Michael Somos, May 20 2005
Multiplicative with a(3^e) = 1, a(p^e) = e+1 if p == 1 (mod 3), a(p^e) = (1+(-1)^e)/2 if p == 2 (mod 3). - Michael Somos, May 20 2005
G.f.: Sum_{k>0} x^(3*k - 2) / (1 - x^(3*k - 2)) - x^(3*k - 1) / (1 - x^(3*k - 1)). - Michael Somos, Nov 02 2005
G.f.: Sum_{n >= 1} q^(n^2)(1-q)(1-q^2)...(1-q^(n-1))/((1-q^(n+1))(1-q^(n+2))...(1-q^(2n))). - Jeremy Lovejoy, Jun 12 2009
a(n) = A001817(n) - A001822(n). - R. J. Mathar, Mar 31 2011
A004016(n) = 6*a(n) unless n=0.
Dirichlet g.f.: zeta(s)*L(chi_2(3),s), with chi_2(3) the nontrivial Dirichlet character modulo 3 (A102283). - Ralf Stephan, Mar 27 2015
From Andrey Zabolotskiy, May 07 2018: (Start)
a(n) = Sum_{ m: m^2|n } A000086(n/m^2).
a(A003136(m)) > 0, a(A034020(m)) = 0 for all m. (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/(3*sqrt(3)) = 0.604599... (A073010). - Amiram Eldar, Oct 11 2022

Extensions

More terms from David Radcliffe
Somos D.g.f. replaced with correct version by Ralf Stephan, Mar 27 2015

A091401 Numbers n such that genus of group Gamma_0(n) is zero.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 16, 18, 25
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2004

Keywords

Comments

Equivalently, numbers n such that genus of modular curve X_0(n) is zero.

References

  • G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see Prop. 1.40 and 1.43.

Crossrefs

The table below is a consequence of Theorem 7.3 in Maier's paper.
N EntryID K alpha
1
2 A127776 4096 1
3 A276018 729 1
4 A002894 256 1
5 A276019 125 4
6 A093388 72 1
7 A276021 49 9
8 A081085 32 1
9 A006077 27 1
10 A276020 20 2
12 A276022 12 1
13 A276177 13 36
16 A276178 8 1
18 A276179 6 1
25 A276180 5 4

Programs

Formula

Numbers n such that A001617(n) = 0.

A001617 Genus of modular group Gamma_0(n). Or, genus of modular curve X_0(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 2, 2, 1, 0, 2, 1, 2, 2, 3, 2, 1, 3, 3, 3, 1, 2, 4, 3, 3, 3, 5, 3, 4, 3, 5, 4, 3, 1, 2, 5, 5, 4, 4, 5, 5, 5, 6, 5, 7, 4, 7, 5, 3, 5, 9, 5, 7, 7, 9, 6, 5, 5, 8, 5, 8, 7, 11, 6, 7, 4, 9, 7, 11, 7, 10, 9, 9, 7, 11, 7, 10, 9, 11, 9, 9, 7, 7, 9, 7, 8, 15
Offset: 1

Views

Author

Keywords

Comments

Also the dimension of the space of cusp forms of weight two and level n. - Gene Ward Smith, May 23 2006

Examples

			G.f. = x^11 + x^14 + x^15 + x^17 + x^19 + x^20 + x^21 + 2*x^22 + 2*x^23 + ...
		

References

  • B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 103.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    a := func< n | n lt 1 select 0 else Dimension( CuspForms( Gamma0(n), 2))>; /* Michael Somos, May 08 2015 */
    
  • Maple
    nu2 := proc (n) # number of elliptic points of order two (A000089) local i, s; if modp(n,4) = 0 then RETURN(0) fi; s := 1; for i in divisors(n) do if isprime(i) and i > 2 then s := s*(1+eval(legendre(-1,i))) fi od; s end:
    nu3 := proc (n) # number of elliptic points of order three (A000086) local d, s; if modp(n,9) = 0 then RETURN(0) fi; s := 1; for d in divisors(n) do if isprime(d) then s := s*(1+eval(legendre(-3,d))) fi od; s end:
    nupara := proc (n) # number of parabolic cusps (A001616) local b, d; b := 0; for d to n do if modp(n,d) = 0 then b := b+eval(phi(gcd(d,n/d))) fi od; b end:
    A001615 := proc(n) local i,j; j := n; for i in divisors(n) do if isprime(i) then j := j*(1+1/i); fi; od; j; end;
    genx := proc (n) # genus of X0(n) (A001617) #1+1/12*psi(n)-1/4*nu2(n)-1/3*nu3(n)-1/2*nupara(n) end: 1+1/12*A001615(n)-1/4*nu2(n)-1/3*nu3(n)-1/2*nupara(n) end: # Gene Ward Smith, May 23 2006
  • Mathematica
    nu2[n_] := Module[{i, s}, If[Mod[n, 4] == 0, Return[0]]; s = 1; Do[ If[ PrimeQ[i] && i > 2, s = s*(1 + JacobiSymbol[-1, i])], {i, Divisors[n]}]; s];
    nu3[n_] := Module[{d, s}, If[Mod[n, 9] == 0, Return[0]]; s = 1; Do[ If[ PrimeQ[d], s = s*(1 + JacobiSymbol[-3, d])], {d, Divisors[n]}]; s];
    nupara[n_] := Module[{b, d}, b = 0; For[d = 1, d <= n, d++, If[ Mod[n, d] == 0, b = b + EulerPhi[ GCD[d, n/d]]]]; b];
    A001615[n_] := Module[{i, j}, j = n; Do[ If[ PrimeQ[i], j = j*(1 + 1/i)], {i, Divisors[n]}]; j];
    genx[n_] := 1 + (1/12)*A001615[n] - (1/4)*nu2[n] - (1/3)*nu3[n] - (1/2)*nupara[n];
    A001617 = Table[ genx[n], {n, 1, 102}] (* Jean-François Alcover, Jan 04 2012, after Gene Ward Smith's Maple program *)
    a[ n_] := If[ n < 1, 0, 1 + Sum[ MoebiusMu[ d]^2 n/d / 12 - EulerPhi[ GCD[ d, n/d]] / 2, {d, Divisors @n}] - Count[(#^2 - # + 1)/n & /@ Range[n], ?IntegerQ]/3 - Count[ (#^2 + 1)/n & /@ Range[n], ?IntegerQ]/4]; (* Michael Somos, May 08 2015 *)
  • PARI
    A000089(n) = {
      if (n%4 == 0 || n%4 == 3, return(0));
      if (n%2 == 0, n \= 2);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 4 == 3, 0, 2));
    };
    A000086(n) = {
      if (n%9 == 0 || n%3 == 2, return(0));
      if (n%3 == 0, n \= 3);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 3 == 2, 0, 2));
    };
    A001615(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, (f[k,1]+1)),
         h = prod(k=1, fsz, f[k,1]));
      return((n*g)\h);
    };
    A001616(n) = {
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, f[k,1]^(f[k,2]\2) + f[k,1]^((f[k,2]-1)\2));
    };
    a(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2;
    vector(102, n, a(n))  \\ Gheorghe Coserea, May 20 2016

Formula

a(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2.
From Gheorghe Coserea, May 20 2016: (Start)
limsup a(n) / (n*log(log(n))) = exp(Euler)/(2*Pi^2), where Euler is A001620.
a(n) >= (n-5*sqrt(n)-8)/12, with equality iff n = p^2 for prime p=1 (mod 12) (see A068228).
a(n) < n * exp(Euler)/(2*Pi^2) * (log(log(n)) + 2/log(log(n))) for n>=3 (see Csirik link).
(End)

A034017 Numbers that are primitively represented by x^2 + xy + y^2.

Original entry on oeis.org

0, 1, 3, 7, 13, 19, 21, 31, 37, 39, 43, 49, 57, 61, 67, 73, 79, 91, 93, 97, 103, 109, 111, 127, 129, 133, 139, 147, 151, 157, 163, 169, 181, 183, 193, 199, 201, 211, 217, 219, 223, 229, 237, 241, 247, 259, 271, 273, 277, 283, 291, 301, 307, 309, 313, 327, 331
Offset: 1

Views

Author

Keywords

Comments

Gives the location of the nonzero terms of A000086.
Starting at a(3), a(n)^2 is the ordered semiperimeter of primitive integer Soddyian triangles (see A210484). - Frank M Jackson, Feb 04 2013
A000086(a(n)) > 0; a(n) = A004611(k) or a(n) = 3*A004611(k) for n > 3 and an appropriate k. - Reinhard Zumkeller, Jun 23 2013
The number of structure units in an icosahedral virus is 20*a(n), see Stannard link. - Charles R Greathouse IV, Nov 03 2015
From Wolfdieter Lang, Apr 09 2021: (Start)
The positive definite binary quadratic form F = [1, 1, 1], that is x^2 + x*y + y^2, has discriminant Disc = -3, and class number 1 (see Buell, Examples, p. 19, first line: Delta = -3, h = 1). This reduced form is equivalent to the form [1,-1, 1], but to no other reduced one (see Buell, Theorem 2.4, p. 15).
This form F represents a positive integer k (= a(n)) properly if and only if A002061(j+1) = 2*T(j) + 1 = j^2 + j + 1 == 0 (mod k), for j from {0, 1, ..., k-1}. This congruence determines the representative parallel primitive forms (rpapfs) of discriminant Disc = -3 and representation of a positive integer number k, given by [k, 2*j+1, c(j)], and c(j) is determined from Disc =-3 as c(j) = ((2*j+1)^2 + 3)/(4*k) = (j^2 + j + 1)/k. Each rpapf has a first reduced form, the so-called right neighbor form, namely [1, 1, 1] for k = 1 = a(1) (the already reduced parallel form from j = 0), and [1, -1, 1] for k = a(n), with n >= 2.
Only odd numbers k are eligible for representation, because 2*T(j) + 1, with the triangular numbers T = A000217, is odd. The odd k with at least one solution of the congruence are then the members of the present sequence.
The solutions of the reduced forms F = [1, 1, 1] and F' = [1, -1, 1] representing k are related by type I equivalence because of the first two entries ([a, a, c] == [a, -a, c]), and also by type II equivalence because [a, b, a] == [a, -b, a], for positive b. These transformation matrices are R_I = Matrix([1, -1],[0, 1]) and R_{II} = Matrix([0, -1], [1, 0]), respectively, to obtain the forms with negative second entry from the ones with positive second entry. The corresponding solutions (x, y)^t (t for transposed) are related by the inverse of these matrices.
The table with the A341422(n) solutions j of the congruence given above are given in A343232. (End)
Apparently, also the integers k that can be expressed as a quotient of two terms from A002061. - Martin Becker, Aug 14 2022
For some x, y let a(n) = r, x*(x+y) = s, y*(x+y) = t, x*y = u then (r,s,t,u) is a Pythagorean quadruple such that r^2 = s^2 + t^2 + u^2. - Frank M Jackson, Feb 26 2024

References

  • B. C. Berndt and R. A. Rankin, Ramanujan: Letters and Commentary, see p. 184, AMS, Providence, RI, 1995.
  • D. A. Buell, Binary Quadratic Forms, Springer, 1989, pp. 15, 19.

Crossrefs

Cf. A000217, A002061, A002476, A003136, A007645 (primes), A045611, A045897, A226946 (complement), A045897 (subsequence), A341422, A343232.

Programs

  • Haskell
    a034017 n = a034017_list !! (n-1)
    a034017_list = 0 : filter ((> 0) . a000086) [1..]
    -- Reinhard Zumkeller, Jun 23 2013
  • Maple
    N:= 1000: # to get all terms <= N
    P:= select(isprime, [seq(6*n+1, n=1..floor((N-1)/6))]):
    A:= {1,3}:
    for p in P do
      A:= {seq(seq(a*p^k, k=0..floor(log[p](N/a))),a=A)}:
    od:
    sort(convert(A,list)); # Robert Israel, Nov 04 2015
  • Mathematica
    lst = {0}; maxLen = 331; Do[If[Reduce[m^2 + m*n + n^2 == k && m >= n >= 0 && GCD[m, n] == 1, {m, n}, Integers] === False, , AppendTo[lst, k]], {k, maxLen}]; lst (* Frank M Jackson, Jan 10 2013 *) (* simplified by T. D. Noe, Feb 05 2013 *)
  • PARI
    is(n)=my(f=factor(n));for(i=1,#f[,1],if(f[i,1]%3!=1 && (f[i,1]!=3 || f[i,2]>1), return(n==0))); 1 \\ Charles R Greathouse IV, Jan 10 2013
    
  • PARI
    list(lim)=if(lim<7, return(select(n->n<=lim, [0,1,3]))); my(v=List([0,1,3])); for(x=1,sqrtint(lim\=1), my(y,t); while(y++Charles R Greathouse IV, Jan 20 2022
    

Formula

Extensions

Extended by Ray Chandler, Jan 29 2009

A304182 Number of primitive inequivalent mirror-symmetric sublattices of rectangular lattice of index n.

Original entry on oeis.org

1, 3, 2, 4, 2, 6, 2, 4, 2, 6, 2, 8, 2, 6, 4, 4, 2, 6, 2, 8, 4, 6, 2, 8, 2, 6, 2, 8, 2, 12, 2, 4, 4, 6, 4, 8, 2, 6, 4, 8, 2, 12, 2, 8, 4, 6, 2, 8, 2, 6, 4, 8, 2, 6, 4, 8, 4, 6, 2, 16, 2, 6, 4, 4, 4, 12, 2, 8, 4, 12, 2, 8, 2, 6, 4, 8, 4, 12, 2, 8, 2, 6, 2, 16, 4
Offset: 1

Views

Author

Andrey Zabolotskiy, May 07 2018

Keywords

Examples

			There are 6 = A001615(4) lattices in Z^2 whose quotient group is C_4. The reflection through an axis relates <(4,0), (1,1)> and <(4,0), (3,1)>. The remaining 4 = a(4) lattices are fixed.
		

Crossrefs

Cf. A069735 (not only primitive sublattices), A304183 (primitive oblique sublattices), A069734 (all sublattices).
Cf. other columns of tables 4 and 5 from [Rutherford, 2009]: A001615, A060594, A157223, A000089, A157224, A000086, A157227, A019590, A157228, A157226, A157230, A157231, A154272, A157235.

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, If[e == 1, 3, 4], 2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 22 2022 *)

Formula

From Álvar Ibeas, Mar 18 2021: (Start)
For n odd, a(n) = A034444(n) = 2^(A001221(n)).
For n even, a(n) = A034444(n) + A034444(n/2). If 4|n, a(n) = 2^(A001221(n) + 1); otherwise, a(n) = 3 * 2^(A001221(n) - 1).
Multiplicative with a(2) = 3, a(2^e) = 4 (for e>1), and a(p^e) = 2 (for p>2).
Dirichlet g.f.: (1+2^(-s)) * zeta(s)^2 / zeta(2s).
(End)
Sum_{k=1..n} a(k) ~ (log(n) + 2*gamma - log(2)/3 - 2*zeta'(2)/zeta(2) - 1)*9*n/Pi^2, where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 31 2022

A091379 a(n) = Product_{ p | n } (1 + Legendre(-1,p) ).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 02 2004

Keywords

References

  • Goro Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see p. 25, Eq. (2) (but without the restriction that a(4k) = 0 and with a different definition of Legendre(-1,2)).

Crossrefs

Programs

  • Maple
    with(numtheory); A091379 := proc(n) local i,t1,t2; t1 := ifactors(n)[2]; t2 := mul((1+legendre(-1,t1[i][1])),i=1..nops(t1)); end;
  • Mathematica
    a[n_] := Module[{t1, t2}, t1 = FactorInteger[n]; t2 = Product[(1 + KroneckerSymbol[-1, t1[[i, 1]]]), {i, 1, Length[t1]}]]; a[1] = 1;
    Array[a, 105] (* Jean-François Alcover, Feb 08 2022, from Maple code *)
  • PARI
    vecproduct(v) = { my(m=1); for(i=1,#v,m *= v[i]); m; };
    A091379(n) = vecproduct(apply(p -> (1 + kronecker(-1,p)), factorint(n)[, 1])); \\ Antti Karttunen, Nov 18 2017

Formula

Here we use the definition that Legendre(-1, 2) = 1, Legendre(-1, p) = 1 if p == 1 mod 4, = -1 if p == 3 mod 4.
From Amiram Eldar, Oct 11 2022: (Start)
Multiplicative with a(p^e) = 0 if p == 3 (mod 4) and 2 otherwise.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3/Pi = 0.954929... (A089491). (End)

A145394 Number of inequivalent sublattices of index n in hexagonal lattice, where two sublattices are considered equivalent if one can be rotated by a multiple of Pi/3 to give the other.

Original entry on oeis.org

1, 1, 2, 3, 2, 4, 4, 5, 5, 6, 4, 10, 6, 8, 8, 11, 6, 13, 8, 14, 12, 12, 8, 20, 11, 14, 14, 20, 10, 24, 12, 21, 16, 18, 16, 31, 14, 20, 20, 30, 14, 32, 16, 28, 26, 24, 16, 42, 21, 31, 24, 34, 18, 40, 24, 40, 28, 30, 20, 56, 22, 32, 36, 43, 28, 48, 24, 42, 32, 48, 24, 65, 26, 38, 42, 48, 32, 56, 28, 62
Offset: 1

Views

Author

N. J. A. Sloane, Feb 23 2009

Keywords

Comments

Also, apparently a(n) is the number of nonequivalent (up to lattice-preserving affine transformation) triangles on 2D square lattice of area n/2 [Karpenkov]. - Andrey Zabolotskiy, Jul 06 2017
From Andrey Zabolotskiy, Jan 18 2018: (Start)
The parent lattice of the sublattices under consideration has Patterson symmetry group p6, and two sublattices are considered equivalent if they are related via a symmetry from that group [Rutherford]. For other 2D Patterson groups, the analogous sequences are A000203 (p2), A069734 (p2mm), A145391 (c2mm), A145392 (p4), A145393 (p4mm), A003051 (p6mm).
If we count sublattices related by parent-lattice-preserving reflection as equivalent, we get A003051 instead of this sequence. If we count sublattices related by rotation of the sublattice only (but not parent lattice; equivalently, sublattices related by rotation by angle which is not a multiple of Pi/3; see illustration in links) as equivalent, we get A054384. If we count sublattices related by any rotation or reflection as equivalent, we get A300651.
Rutherford says at p. 161 that a(n) != A054384(n) only when A002324(n) > 1, but actually these two sequences differ at other terms, too, for example, at n = 14 (see illustration). (End)

Crossrefs

Programs

  • Mathematica
    a[n_] := (DivisorSigma[1, n] + 2 DivisorSum[n, Switch[Mod[#, 3], 1, 1, 2, -1, 0, 0] &])/3; Array[a, 80] (* Jean-François Alcover, Dec 03 2015 *)
  • PARI
    A002324(n) = if( n<1, 0, sumdiv(n, d, (d%3==1) - (d%3==2)));
    A000203(n) = if( n<1, 0, sigma(n));
    a(n) = (A000203(n) + 2 * A002324(n)) / 3;
    \\ Joerg Arndt, Oct 13 2013

Formula

a(n) = (A000203(n) + 2 * A002324(n))/3. [Rutherford] - N. J. A. Sloane, Mar 13 2009
a(n) = Sum_{ m: m^2|n } A000086(n/m^2) + A157227(n/m^2) = A002324(n) + Sum_{ m: m^2|n } A157227(n/m^2). [Rutherford] - Andrey Zabolotskiy, Apr 23 2018
a(n) = Sum_{ d|n } A008611(d-1). - Andrey Zabolotskiy, Aug 29 2019

Extensions

New name from Andrey Zabolotskiy, Dec 14 2017

A053873 Numbers n such that OEIS sequence A_n contains n.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 10, 14, 16, 19, 26, 27, 36, 37, 52, 59, 62, 69, 72, 115, 119, 120, 121, 134, 161, 164, 174, 177, 188, 189, 190, 193, 194, 195, 196, 209, 224, 265, 267, 277
Offset: 1

Views

Author

Jens Voß, Mar 30 2000

Keywords

Comments

A number n is in this sequence iff n appears anywhere in the terms of A_n, not just in the terms that are visible in the entry.
Is 53873 in this sequence? (A rhetorical question!) - Tanya Khovanova, Aug 09 2007
Is 53169 in this sequence? (A rhetorical question!). - Raymond Wang, Oct 07 2008
I skipped 241 since it appears that A000241(14) > 241, but as the 13th and further terms are not known this is not certain. The next term in the sequence is almost surely 319, but finding the least k for which A000319(k) = 319 requires calculating a chaotic sequence to high precision. - Charles R Greathouse IV, Jul 20 2007
241 is not in this sequence, since A000241(13) <= 225 and A000241(14) >= 0.8594*315 (see comments in A000241). - Danny Rorabaugh, Mar 13 2015

Examples

			4 is not in A000004, so 4 is not in this sequence.
60 is not in A000060, so 60 is not in this sequence.
86 is not in A000086, so 86 is not in this sequence.
		

Crossrefs

Complement of A053169.

Extensions

More terms from N. J. A. Sloane, Aug 24 2006
a(23)-a(25) from Charles R Greathouse IV, Aug 30 2006
a(26)-a(40) from Charles R Greathouse IV, Jul 20 2007
Typo in one entry corrected by Olaf Voß, Feb 25 2008

A276183 Genus of the quotient of the modular curve X_0(n) by the Fricke involution.

Original entry on oeis.org

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

Views

Author

Gheorghe Coserea, Oct 21 2016

Keywords

Comments

a(n) is the genus of quotient space H/Gamma_0*(n), where H is the upper half plane and Gamma_0*(n) = Gamma_0(n) + W Gamma_0(n) is the extension of Gamma_0(n) via the involution z <-> W(z) = -n/z (see Cohn, 1988).

Examples

			G.f. = x^22 + x^28 + x^30 + x^33 + x^34 + x^37 + x^38 + x^40 + 2*x^42 + x^43 + x^44 + ...
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[n < 1, 0, 1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d, Divisors@ n}] - Count[(#^2 - # + 1)/n & /@ Range@ n, ?IntegerQ]/3 - Count[(#^2 + 1)/n & /@ Range@ n, ?IntegerQ]/4];
    g[n_] := Ceiling[k0 = k /. FindRoot[EllipticK[1 - k^2]/EllipticK[k^2] == Sqrt@ n, {k, 1/2, 10^-10, 1}, WorkingPrecision -> 600, MaxIterations -> 100]; Exponent[MinimalPolynomial[RootApproximant[k0^2, 24], x], x]/2];
    r[n_] := If[MemberQ[{3, 7}, #], 3 + (# - 1)/2, 3] &@ Mod[n, 8]; a[n_] := If[n <= 4, 0, (1 + f@ n)/2 - r[n] g[n]/12]; Table[Print["a(", n, ") = ", an = a[n]]; an, {n, 102}] (* Michael De Vlieger, Oct 28 2016, after Michael Somos at A001617 and Jean-François Alcover at A000003 *)
    ClassList[n_?Negative] :=
    Select[Flatten[#, 1] &@Table[
        {i, j, (j^2 - n)/(4 i)}, {i, Sqrt[-n/3]}, {j, 1 - i, i}],
      Mod[#3, 1] == 0 && #3 >= # &&
          GCD[##] == 1 && ! (# == #3 && #2 < 0) & @@ # &]
    A001617[n_] := If[n < 1, 0,
      1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d,
         Divisors@n}] -
       Count[(#^2 - # + 1)/n & /@ Range[n], _?IntegerQ]/3 -
       Count[(#^2 + 1)/n & /@ Range[n], _?IntegerQ]/4];
    a[n_] := If[0 <= n <= 4, 0, (A001617[n] + 1)/2 - If[Mod[n, 8] == 3, 4, If[Mod[n, 8] == 7, 6, 3]] Length[ClassList[-4 n]]/12] (* David Jao, Sep 07 2020 *)
  • PARI
    A000003(n) = qfbclassno(-4*n);
    A000089(n) = {
      if (n%4 == 0 || n%4 == 3, return(0));
      if (n%2 == 0, n \= 2);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k, 1] % 4 == 3, 0, 2));
    };
    A000086(n) = {
      if (n%9 == 0 || n%3 == 2, return(0));
      if (n%3 == 0, n \= 3);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k, 1] % 3 == 2, 0, 2));
    };
    A001615(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, (f[k, 1]+1)),
         h = prod(k=1, fsz, f[k, 1]));
      return((n*g)\h);
    };
    A001616(n) = {
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, f[k, 1]^(f[k, 2]\2) + f[k, 1]^((f[k, 2]-1)\2));
    };
    A001617(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2;
    a(n) = {
      my(r = if (n%8 == 3, 4, n%8 == 7, 6, 3));
      if (n < 5, 0, (1 + A001617(n))/2 - r * A000003(n)/12);
    };
    vector(102, n, a(n))

Formula

a(n) = (1 + A001617(n))/2 - r * A000003(n)/12 for all n > 4, where r=4 for n=3 (mod 8), r=6 for n=7 (mod 8) and r=3 otherwise.
a(n) <> 4884 for all n.

Extensions

New name from David Jao, Sep 07 2020

A054729 Numbers n such that genus of modular curve X_0(N) is never equal to n.

Original entry on oeis.org

150, 180, 210, 286, 304, 312, 336, 338, 348, 350, 480, 536, 570, 598, 606, 620, 666, 678, 706, 730, 756, 780, 798, 850, 876, 896, 906, 916, 970, 1014, 1026, 1046, 1106, 1144, 1170, 1176, 1186, 1188, 1224, 1244, 1260, 1320, 1350, 1356, 1366
Offset: 1

Views

Author

Janos A. Csirik, Apr 21 2000

Keywords

Comments

"Looking further in the list of integers not of the form g0(N), we do eventually find some odd values, the first one occurring at the 3885th position. There are four such up to 10^5 (out of 9035 total missed values), namely 49267, 74135, 94091, 96463." (see Csirik link) - Gheorghe Coserea, May 21 2016.
a(1534734) = 9999996. - Gheorghe Coserea, May 23 2016

Crossrefs

Programs

  • Mathematica
    a1617[n_] := a1617[n] = If[n < 1, 0, 1 + Sum[MoebiusMu[d]^2 n/d/12 - EulerPhi[GCD[d, n/d]]/2, {d, Divisors[n]}] - Count[(#^2 - # + 1)/n & /@ Range[n], ?IntegerQ]/3 - Count[(#^2+1)/n & /@ Range[n], ?IntegerQ]/4];
    seq[n_] := Module[{inv, bnd}, inv[_] = -1; bnd = 12 n + 18 Floor[Sqrt[n]] + 100; For[k = 1, k <= bnd, k++, g = a1617[k]; If[g <= n && inv[g+1] == -1, inv[g+1] = k]]; (Position[Array[inv, n+1], -1] // Flatten)-1];
    seq[1000] (* Jean-François Alcover, Nov 20 2018, after Gheorghe Coserea and Michael Somos in A001617 *)
  • PARI
    A000089(n) = {
      if (n%4 == 0 || n%4 == 3, return(0));
      if (n%2 == 0, n \= 2);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 4 == 3, 0, 2));
    };
    A000086(n) = {
      if (n%9 == 0 || n%3 == 2, return(0));
      if (n%3 == 0, n \= 3);
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, if (f[k,1] % 3 == 2, 0, 2));
    };
    A001615(n) = {
      my(f = factor(n), fsz = matsize(f)[1],
         g = prod(k=1, fsz, (f[k,1]+1)),
         h = prod(k=1, fsz, f[k,1]));
      return((n*g)\h);
    };
    A001616(n) = {
      my(f = factor(n), fsz = matsize(f)[1]);
      prod(k = 1, fsz, f[k,1]^(f[k,2]\2) + f[k,1]^((f[k,2]-1)\2));
    };
    A001617(n) = 1 + A001615(n)/12 - A000089(n)/4 - A000086(n)/3 - A001616(n)/2;
    scan(n) = {
      my(inv = vector(n+1,g,-1), bnd = 12*n + 18*sqrtint(n) + 100, g);
      for (k = 1, bnd, g = A001617(k);
           if (g <= n && inv[g+1] == -1, inv[g+1] = k));
      apply(x->(x-1), Vec(select(x->x==-1, inv, 1)))
    };
    scan(1367)  \\ Gheorghe Coserea, May 21 2016
Showing 1-10 of 34 results. Next