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.

Previous Showing 11-20 of 34 results. Next

A091403 Numbers n such that genus of group Gamma_0(n) is 1.

Original entry on oeis.org

11, 14, 15, 17, 19, 20, 21, 24, 27, 32, 36, 49
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2004

Keywords

Comments

I assume it is known that there are no further terms? A reference for this would be nice.
Available conductors for modular elliptic curves genus 1. [From Artur Jasinski, Jun 24 2010]

References

  • B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 103.
  • G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see Prop. 1.40 and 1.43.

Crossrefs

Programs

  • Mathematica
    a89[n_] := a89[n] = Product[{p, e} = pe; Which[p < 3 && e == 1, 1, p == 2 && e > 1, 0, Mod[p, 4] == 1, 2, Mod[p, 4] == 3, 0, True, a89[p^e]], {pe, FactorInteger[n]}];
    a86[n_] := a86[n] = Product[{p, e} = pe; Which[p == 1 || p == 3 && e == 1, 1, p == 3 && e > 1, 0, Mod[p, 3] == 1, 2, Mod[p, 3] == 2, 0, True, a86[p^e]], {pe, FactorInteger[n]}];
    a1615[n_] := n Sum[MoebiusMu[d]^2/d, {d, Divisors[n]}];
    a1616[n_] := Sum[EulerPhi[GCD[ d, n/d]], {d, Divisors[n]}];
    a1617[n_] := 1 + a1615[n]/12 - a89[n]/4 - a86[n]/3 - a1616[n]/2;
    Position[Array[a1617, 100], 1] // Flatten (* Jean-François Alcover, Oct 18 2018 *)

Formula

Numbers n such that A001617(n) = 1.

A376202 Number of pairs 1 <= x <= y <= n-1 such that gcd(x,n) = gcd(y,n) = gcd(x+y,n) = 1 and 1/x + 1/y == 1/(x+y) mod n.

Original entry on oeis.org

0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 18, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 36, 0, 24, 0, 0, 0, 42, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 60, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 0, 60, 0, 0, 0, 96, 0, 0, 0, 0, 0, 102, 0, 0
Offset: 1

Views

Author

Tom Duff and N. J. A. Sloane, Oct 06 2024

Keywords

Comments

In general, 1/x + 1/y = 1/(x+y) is the wrong way to add fractions!
See A376203 for a(2*n-1)/2 and A376755 for a(6*n+1)/6.
From Robert Israel, Nov 06 2024: (Start)
If a(n) = 0 then a(m) = 0 whenever m is a multiple of n.
It appears that the primes p for which a(p) > 0 are A007645. (End)

Examples

			For n = 3 the a(3) = 2 solutions are (x,y) = (1,1) and (2,2).
For n = 7 the a(7) = 6 solutions are (x,y) = (1,2), (1,4), (2,4), (3,5), (3,6), (5,6).
		

Crossrefs

Programs

  • Maple
    a:=[];
    for n from 1 to 140 do
    c:=0;
    for y from 1 to n-1 do
    for x from 1 to y do
    if gcd(y,n) = 1 and gcd(x,n) = 1 and gcd(x+y,n) = 1  and (1/x + 1/y - 1/(x+y)) mod n = 0 then c:=c+1; fi;
    od: # od x
    od: # od y
    a:=[op(a),c];
    od: # od n
    a;
  • Python
    from math import gcd
    def A376202(n):
        c = 0
        for x in range(1,n):
            if gcd(x,n) == 1:
                for y in range(x,n):
                    if gcd(y,n)==gcd(z:=x+y,n)==1 and not (w:=z**2-x*y)//gcd(w,x*y*z)%n:
                        c += 1
        return c # Chai Wah Wu, Oct 06 2024

A376203 a(n) = A376202(2*n-1)/2.

Original entry on oeis.org

0, 1, 0, 3, 0, 0, 6, 0, 0, 9, 6, 0, 0, 0, 0, 15, 0, 0, 18, 12, 0, 21, 0, 0, 21, 0, 0, 0, 18, 0, 30, 0, 0, 33, 0, 0, 36, 0, 0, 39, 0, 0, 0, 0, 0, 72, 30, 0, 48, 0, 0, 51, 0, 0, 54, 36, 0, 0, 0, 0, 0, 0, 0, 63, 42, 0, 108, 0, 0, 69
Offset: 1

Views

Author

Tom Duff and N. J. A. Sloane, Oct 06 2024

Keywords

Crossrefs

Programs

  • Python
    from math import gcd
    def A376203(n):
        c, m = 0, (n<<1)-1
        for x in range(1,m):
            if gcd(x,m) == 1:
                for y in range(x,m):
                    if gcd(y,m)==gcd(z:=x+y,m)==1 and not (w:=z**2-x*y)//gcd(w,x*y*z)%m:
                        c += 1
        return c>>1 # Chai Wah Wu, Oct 06 2024

A376755 a(n) = A376202(6*n+1)/6.

Original entry on oeis.org

1, 2, 3, 0, 5, 6, 7, 7, 0, 10, 11, 12, 13, 0, 24, 16, 17, 18, 0, 0, 21, 36, 23, 0, 25, 26, 27, 26, 0, 30, 0, 32, 33, 0, 35, 60, 37, 38, 0, 40, 72, 0, 72, 0, 45, 46, 47, 0, 0, 84, 51, 52, 0, 0, 55, 56, 49, 58, 0, 57, 61, 62, 63, 0, 0, 66, 120, 68, 0, 70, 120, 72
Offset: 1

Views

Author

Tom Duff and N. J. A. Sloane, Oct 06 2024

Keywords

Crossrefs

Programs

  • Python
    from math import gcd
    def A376755(n):
        c, m = 0, 6*n|1
        for x in range(1,m):
            if gcd(x,m) == 1:
                for y in range(x,m):
                    if gcd(y,m)==gcd(z:=x+y,m)==1 and not (w:=z**2-x*y)//gcd(w,x*y*z)%m:
                        c += 1
        return c//6 # Chai Wah Wu, Oct 06 2024

Extensions

a(51)-a(72) from Chai Wah Wu, Oct 06 2024

A376756 Number of pairs 0 <= x <= y <= n-1 such that x^2 + x*y + y^2 == 0 (mod n).

Original entry on oeis.org

1, 1, 3, 3, 1, 3, 7, 3, 6, 1, 1, 9, 13, 7, 3, 10, 1, 6, 19, 3, 21, 1, 1, 9, 15, 13, 18, 27, 1, 3, 31, 10, 3, 1, 7, 21, 37, 19, 39, 3, 1, 21, 43, 3, 6, 1, 1, 30, 70, 15, 3, 51, 1, 18, 1, 27, 57, 1, 1, 9, 61, 31, 60, 36, 13, 3, 67, 3, 3, 7, 1, 21, 73, 37, 45, 75, 7, 39, 79, 10, 45, 1, 1, 81, 1, 43, 3, 3, 1, 6, 163, 3, 93, 1, 19, 30, 97
Offset: 1

Views

Author

Tom Duff and N. J. A. Sloane, Oct 06 2024

Keywords

Crossrefs

Programs

  • Python
    def A376756(n):
        c = 0
        for x in range(n):
            z = x**2%n
            for y in range(x,n):
                if not (z+y*(x+y))%n:
                    c += 1
        return c # Chai Wah Wu, Oct 06 2024

A376757 Number of pairs 0 <= x <= y <= n-1 such that x^3 == y^3 (mod n).

Original entry on oeis.org

1, 2, 3, 5, 5, 6, 13, 14, 18, 10, 11, 15, 25, 26, 15, 28, 17, 36, 37, 25, 39, 22, 23, 42, 35, 50, 81, 71, 29, 30, 61, 72, 33, 34, 65, 99, 73, 74, 75, 70, 41, 78, 85, 55, 90, 46, 47, 84, 112, 70, 51, 137, 53, 162, 55, 218, 111, 58, 59, 75, 121, 122, 288, 208, 125, 66, 133, 85, 69, 130, 71, 306, 145, 146, 105, 203, 143, 150, 157
Offset: 1

Views

Author

Tom Duff and N. J. A. Sloane, Oct 06 2024

Keywords

Comments

A087786 includes pairs (x,y) with x>y (which are excluded from the present sequence).

Crossrefs

Programs

  • PARI
    a(n) = sum(x=0, n-1, sum(y=x, n-1, Mod(x, n)^3 == Mod(y, n)^3)); \\ Michel Marcus, Oct 06 2024
    
  • Python
    from collections import Counter
    def A376757(n): return sum(d*(d+1)>>1 for d in Counter(pow(x,3,n) for x in range(n)).values()) # Chai Wah Wu, Oct 06 2024

A054728 a(n) is the smallest level N such that genus of modular curve X_0(N) is n (or -1 if no such curve exists).

Original entry on oeis.org

1, 11, 22, 30, 38, 42, 58, 60, 74, 66, 86, 78, 106, 105, 118, 102, 134, 114, 223, 132, 166, 138, 188, 156, 202, 168, 214, 174, 236, 186, 359, 204, 262, 230, 278, 222, 298, 240, 314, 246, 326, 210, 346, 270, 358, 282, 557, 306, 394, 312, 412, 318
Offset: 0

Views

Author

Janos A. Csirik, Apr 21 2000

Keywords

Comments

a(150) = -1, a(n) > 0 for 0<=n<=149.
a(9999988) = 119999861 is the largest value in the first 1+10^7 terms of the sequence. - Gheorghe Coserea, May 24 2016

References

  • J. A. Csirik, The genus of X_0(N) is not 150, preprint, 2000.

Crossrefs

Programs

  • Mathematica
    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 = Table[-1, {n+1}]; bnd = 12n + 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]]; inv];
    seq[51] (* 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;
    seq(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));
      return(inv);
    };
    seq(51)  \\ Gheorghe Coserea, May 21 2016

Formula

A001617(a(A001617(n))) = A001617(n) and a(A054729(n)) = -1 for all n>=1. - Gheorghe Coserea, May 22 2016

A091404 Numbers n such that genus of group Gamma_0(n) is 2.

Original entry on oeis.org

22, 23, 26, 28, 29, 31, 37, 50
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2004

Keywords

Comments

I assume it is known that there are no further terms? A reference for this would be nice.

References

  • B. Schoeneberg, Elliptic Modular Functions, Springer-Verlag, NY, 1974, p. 103.
  • G. Shimura, Introduction to the Arithmetic Theory of Automorphic Functions, Princeton, 1971, see Prop. 1.40 and 1.43.

Crossrefs

Programs

  • Mathematica
    a89[n_] := a89[n] = Product[{p, e} = pe; Which[p < 3 && e == 1, 1, p == 2 && e > 1, 0, Mod[p, 4] == 1, 2, Mod[p, 4] == 3, 0, True, a89[p^e]], {pe, FactorInteger[n]}];
    a86[n_] := a86[n] = Product[{p, e} = pe; Which[p == 1 || p == 3 && e == 1, 1, p == 3 && e > 1, 0, Mod[p, 3] == 1, 2, Mod[p, 3] == 2, 0, True, a86[p^e]], {pe, FactorInteger[n]}];
    a1615[n_] := n Sum[MoebiusMu[d]^2/d, {d, Divisors[n]}];
    a1616[n_] := Sum[EulerPhi[GCD[d, n/d]], {d, Divisors[n]}];
    a1617[n_] := 1 + a1615[n]/12 - a89[n]/4 - a86[n]/3 - a1616[n]/2;
    Position[Array[a1617, 100], 2] // Flatten (* Jean-François Alcover, Oct 19 2018 *)

Formula

Numbers n such that A001617(n) = 2.

A000091 Multiplicative with a(2^e) = 2 for k >= 1; a(3) = 2, a(3^e) = 0 for k >= 2; a(p^e) = 0 if p > 3 and p == -1 (mod 3); a(p^e) = 2 if p > 3 and p == 1 (mod 3).

Original entry on oeis.org

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

Views

Author

Keywords

Programs

  • Maple
    A000091 := proc(n) local b,d,nt,c; if n = 1 then RETURN(1); fi; c := 1; if n mod 2 = 0 then c := c*2; fi; if n mod 3 = 0 then c := c*2; fi; nt := n; while nt mod 2 = 0 do nt := nt/2; od; while nt mod 3 = 0 do nt := nt/3; od; if irem(n,9) = 0 then RETURN(0); fi; b := 1; for d from 3 to nt do if irem(nt,d) = 0 and isprime(d) then b := b*(1+legendre(-3,d)); fi; od; RETURN(b*c); end;
  • Mathematica
    a[1] = 1; a[n_] := Block[{b, d, nt, c = 1}, If[Mod[n, 2] == 0, c = c*2]; If[Mod[n, 3] == 0, c = c*2]; nt = n; While[ Mod[nt, 2] == 0, nt = nt/2]; While[ Mod[nt, 3] == 0, nt = nt/3]; If[Mod[n, 9] == 0, Return[0]]; b = 1; For[d = 3, d <= nt, d++, If[Mod[nt, d] == 0 && PrimeQ[d], b = b*(1+JacobiSymbol[-3, d])]]; Return[b*c]]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Feb 06 2012, after Maple *)

Extensions

Description corrected Mar 02 2004. (The old description defined A000086, not this sequence.)

A226946 Numbers that can't be written as x^2 + x*y + y^2, with 0 <= x <= y and gcd(x,y) = 1.

Original entry on oeis.org

2, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 38, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 80, 81, 82
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2013

Keywords

Comments

A000086(a(n)) = 0.
Also numbers n with psi(n) congruent to 0 mod 3, where psi is A001615, and also numbers divisible by 9 or by at least one prime of the form 3k-1: A003627. - Enrique Pérez Herrero, Dec 08 2013

Crossrefs

Cf. A034017 (complement).

Programs

  • Haskell
    a226946 n = a226946_list !! (n-1)
    a226946_list = filter ((== 0) . a000086) [1..]
    -- Reinhard Zumkeller, Dec 16 2013, Jun 23 2013
  • Mathematica
    Select[Range[1000],Mod[# * Times@@(1+1/Transpose[FactorInteger[#]][[1]]),3]==0&] (* Enrique Pérez Herrero, Dec 08 2013 *)
    nn = 10; lim = 1 + nn + nn^2; Complement[Range[2, lim], Select[Union[Flatten[Table[If[GCD[x, y] == 1, x^2 + x*y + y^2, 0], {y, nn}, {x, y}]]], # <= lim &]] (* T. D. Noe, Dec 09 2013 *)

Extensions

The original definition was too weak; thanks to T. D. Noe for having corrected this. - Reinhard Zumkeller, Dec 09 2013
Previous Showing 11-20 of 34 results. Next