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 21-30 of 34 results. Next

A341422 a(n) is the number of solutions of the congruence j^2 + j + 1 == 0 (mod k = A034017(n+1)), for j from {0, 1, 2, ..., k-1}, for n >= 1.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Apr 08 2021

Keywords

Comments

This gives the row lengths of the irregular triangle A343232.
This sequence gives the number of representative parallel primitive forms (rpapfs) of the positive definite binary quadratic form F = x^2 + x*y + y^2 (with Discriminant Disc = -3) representing positive integers k. Only certain odd k, namely k = k(n) = A034017(n+1), for n >= 1, have proper solutions F = k.
Positive definite binary quadratic primitive forms F = [a, b, c], with a > 0 and gcd(a, b, c) = 1, with odd discriminants Disc = b^2 - 4*a*c = -D < 0, that is, D == 3 (mod 4), and representation of positive integers k have representative parallel primitive forms (rpapfs) Fpa(D,k;j) = [k, 2*j+1, (j^2 + j + (D+1)/4)/k].
Each rpapf produces a trivial proper solution to F = k, obtained from the trivial solution of Fpa(D,k;j) = k by (x, y) = (1,0), via equivalence transformations of determinant +1 achieved by applying the inverse of products of matrices R(t) = Mat([0,-1], [1t]]) for certain values t. The R(t) transformations are used to obtain from a primitive form F = [a, b, c] the equivalent so-called unique half-reduced (right) neighbor form F' = [c, -b + 2*c*t, a - b*t + c*t^2], with the choice t = ceiling((b/c - 1)/2). (c > 0 because a > 0 for positive definite forms with D > 0.)

Crossrefs

Cf. A000086 (with zeros), A002061, A034017, A343232.

Formula

a(n) = |M(k(n))|, with the set M(k(n)) := {j from {0, 1, ..., k(n)-1} | j^2 + j + 1 == 0 (mod k(n))}, where j^2 + j + 1 = 2*T(j) + 1 = A002061(j+1) and k(n) = A034017(n+1), for n >= 1.

A353886 Nonnegative numbers k such that k^2 + k + 1 is squarefree.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 69, 70, 71, 72
Offset: 1

Views

Author

Rémy Sigrist, May 09 2022

Keywords

Comments

Dimitrov proved that this sequence is infinite.
The number of terms not exceeding X is Product_{p prime} (1 - A000086(p)/p^2) * X + O(X^(4/5+eps)) (Dimitrov, 2023). The coefficient of X, which is the asymptotic density of this sequence, equals Product_{primes p == 1 (mod 3)} (1 - 2/p^2) = 0.93484201367... . - Amiram Eldar, Dec 11 2023

Examples

			For k = 4, 4^2 + 4 + 1 = 21 = 3 * 7 is squarefree, so 4 belongs to this sequence.
		

Crossrefs

Cf. A000086, A002061, A005117, A353887 (corresponding squarefree numbers).

Programs

  • Mathematica
    Select[Range[0, 72], SquareFreeQ[#^2 + # + 1] &] (* Amiram Eldar, Dec 11 2023 *)
  • PARI
    is(k) = issquarefree(k^2 + k + 1);

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

Original entry on oeis.org

49267, 74135, 94091, 96463, 102727, 107643, 118639, 138483, 145125, 181703, 182675, 208523, 221943, 237387, 240735, 245263, 255783, 267765, 269627, 272583, 277943, 280647, 283887, 286815, 309663, 313447, 322435, 326355, 336675, 347823, 352719
Offset: 1

Views

Author

Janos A. Csirik, Apr 21 2000

Keywords

Comments

There are 4329 odd integers in the sequence less than 10^7. - Gheorghe Coserea, May 23 2016

References

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

Crossrefs

Programs

  • 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));
      select(x->(x%2==1), apply(x->(x-1), Vec(select(x->x==-1, inv, 1))));
    };
    scan(400*1000)

Extensions

More terms from Gheorghe Coserea, May 23 2016
Offset corrected by Gheorghe Coserea, May 23 2016

A087694 Number of solutions to x^2 + xy + y^2 == 0 (mod n).

Original entry on oeis.org

1, 1, 3, 4, 1, 3, 13, 4, 9, 1, 1, 12, 25, 13, 3, 16, 1, 9, 37, 4, 39, 1, 1, 12, 25, 25, 27, 52, 1, 3, 61, 16, 3, 1, 13, 36, 73, 37, 75, 4, 1, 39, 85, 4, 9, 1, 1, 48, 133, 25, 3, 100, 1, 27, 1, 52, 111, 1, 1, 12, 121, 61, 117, 64, 25, 3, 133, 4, 3, 13
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003

Keywords

Crossrefs

Programs

  • Maple
    A087694 := proc(n) option remember; local pf,p,f,e ; if n = 1 then 1; else pf := ifactors(n)[2] ; if nops(pf) = 1 then f := op(1,pf) ; p := op(1,f) ; e := op(2,f) ; if p = 3 then n ; elif p mod 3 =1 then ((p-1)*e+p)*p^(e-1) ; else p^(2*floor(e/2)) ; end if; else mul(procname(op(1,p)^op(2,p)),p=pf) ; end if; end if; end proc:
    seq(A087694(n),n=1..70) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    a[n_] := If[n==1, 1, Product[{p, e} = pe; Which[p==3, 3^e, Mod[p, 3] == 2, (p^2)^Quotient[e, 2], True, ((p-1) e + p) p^(e-1)], {pe, FactorInteger[n] }]];
    a /@ Range[1, 100] (* Jean-François Alcover, Sep 20 2019, from PARI *)
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); if(p==3, 3^e, if(p%3==2, (p^2)^(e\2), ((p-1)*e+p)*p^(e-1))))} \\ Andrew Howroyd, Jul 09 2018

Formula

Multiplicative with a(3^e) = 3^e, a(p^e) = ((p-1)*e+p)*p^(e-1) if p mod 3 = 1, a(p^e) = p^(2*floor(e/2)) if p mod 3 = 2. - Vladeta Jovovic, Sep 27 2003
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = A073010/A086724 = 0.77383581325017004332... . - Amiram Eldar, Nov 21 2023

A157227 Number of primitive inequivalent (up to Pi/3 rotation) non-hexagonal sublattices of hexagonal (triangular) lattice of index n.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 2, 4, 4, 6, 4, 8, 4, 8, 8, 8, 6, 12, 6, 12, 10, 12, 8, 16, 10, 14, 12, 16, 10, 24, 10, 16, 16, 18, 16, 24, 12, 20, 18, 24, 14, 32, 14, 24, 24, 24, 16, 32, 18, 30, 24, 28, 18, 36, 24, 32, 26, 30, 20, 48, 20, 32, 32, 32, 28, 48, 22, 36, 32, 48
Offset: 1

Views

Author

N. J. A. Sloane, Feb 25 2009

Keywords

Crossrefs

Cf. A000086 (primitive hexagonal sublattices), A002324 (all hexagonal sublattices), A145394 (all sublattices), A001615, A304182.

Formula

a(n) = (A001615(n) - A000086(n))/3. - Andrey Zabolotskiy, May 09 2018

Extensions

New name and more terms from Andrey Zabolotskiy, May 09 2018

A157235 Number of primitive inequivalent oblique sublattices of hexagonal (triangular) lattice of index n (equivalence and symmetry of sublattices are determined using only parent lattice symmetries).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 2, 1, 3, 2, 2, 2, 5, 2, 4, 3, 5, 3, 4, 4, 6, 5, 6, 4, 10, 4, 6, 6, 8, 6, 10, 5, 9, 7, 8, 6, 14, 6, 10, 10, 11, 7, 12, 8, 14, 10, 12, 8, 17, 10, 12, 11, 14, 9, 20, 9, 15, 14, 14, 12, 22, 10, 16, 14, 22, 11, 20, 11, 18, 18, 18
Offset: 1

Views

Author

N. J. A. Sloane, Feb 25 2009

Keywords

Crossrefs

Cf. A003051 (all sublattices), A003050 (all primitive sublattices), A154272 (primitive sublattices fully inheriting the parent lattice symmetry, inlcuding the orientation of the mirrors), A000086 (primitive rotation-symmetric sublattices, counting mirror images as distinct), A060594 (primitive mirror-symmetric sublattices), A145377 (all sublattices inheriting the parent lattice symmetry), A304182.

Formula

a(n) = A003050(n) - (A000086(n)-A154272(n))/2 - A060594(n). - Andrey Zabolotskiy, Mar 19 2021

Extensions

New name and a(1)=0 prepended by Andrey Zabolotskiy, May 09 2018
Terms a(31) and beyond from Andrey Zabolotskiy, Mar 19 2021

A224516 Number of solutions to x^4 - x == 0 (mod n).

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 4, 2, 4, 4, 2, 4, 4, 8, 4, 2, 2, 8, 4, 4, 8, 4, 2, 4, 2, 8, 4, 8, 2, 8, 4, 2, 4, 4, 8, 8, 4, 8, 8, 4, 2, 16, 4, 4, 8, 4, 2, 4, 4, 4, 4, 8, 2, 8, 4, 8, 8, 4, 2, 8, 4, 8, 16, 2, 8, 8, 4, 4, 4, 16, 2, 8, 4, 8, 4, 8, 8, 16, 4, 4, 4, 4, 2, 16, 4
Offset: 1

Views

Author

Eric M. Schmidt, Apr 09 2013

Keywords

Examples

			The solutions for n = 7 are 0, 1, 2, and 4.
		

Crossrefs

Programs

  • Mathematica
    f[3, e_] := If[e == 1, 2, 4]; f[p_, e_] := If[Mod[p, 3] == 2, 2, 4]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 19 2020 *)
  • Sage
    def A224516(n) :
        res = 1
        for p, m in factor(n) :
            if (p % 3 == 2) or (p == 3 and m == 1) : res *= 2
            else : res *= 4
        return res

Formula

Multiplicative with a(p^e) = 4 for p == 1 (mod 3); a(p^e) = 2 for p == 2 (mod 3); a(3^1) = 2; a(3^e) = 4 for e > 1.

A273445 a(n) is the number of solutions of the equation n = A001617(k).

Original entry on oeis.org

15, 12, 8, 11, 7, 14, 4, 13, 7, 12, 4, 15, 4, 9, 6, 10, 5, 16, 2, 20, 3, 14, 7, 11, 2, 13, 5, 11, 3, 14, 3, 9, 6, 13, 3, 17, 3, 14, 4, 10, 4, 20, 3, 15, 3, 12, 1, 15, 2, 20, 4, 11, 3, 13, 3, 16, 3, 12, 3, 15, 3, 12, 5, 9, 4, 15, 2, 14, 5, 17, 3, 13
Offset: 0

Views

Author

Gheorghe Coserea, May 22 2016

Keywords

Comments

The zeros of the sequence are given by A054729. The first five zeros of the sequence have indexes 150, 180, 210, 286, 304.

Examples

			For n = 0 the a(0) = 15 solutions are:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 16, 18, 25 (A091401).
For n = 1 the a(1) = 12 solutions are:
11, 14, 15, 17, 19, 20, 21, 24, 27, 32, 36, 49 (A091403).
For n = 2 the a(2) = 8 solutions are:
22, 23, 26, 28, 29, 31, 37, 50 (A091404).
		

Crossrefs

Programs

  • Mathematica
    (* b = A001617 *) nmax = 71;
    b[n_] := b[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];
    Clear[f];
    f[m_] := f[m] = Module[{}, A001617 = Array[b, m]; a[n_] := Count[A001617, n]; Table[a[n], {n, 0, nmax}]];
    f[m = nmax]; f[m = m + nmax];
    While[Print["m = ", m]; f[m] != f[m - nmax], m = m + nmax];
    A273445 = f[m] (* Jean-François Alcover, Dec 16 2018, using Michael Somos' code for 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(a = vector(n+1,g,0), bnd = 12*n + 18*sqrtint(n) + 100, g);
      for (k = 1, bnd, g = A001617(k);
           if (g <= n, a[g+1]++));
      return(a);
    };
    seq(72)

Formula

a(n) = card {k, n = A001617(k)}.

A087781 Number of non-congruent solutions to x^2 - x - 1 == 0 mod n.

Original entry on oeis.org

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

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 06 2003

Keywords

Comments

Sequence A089270 gives the positions of the nonzero terms. The term a(n) gives the number of primitive solutions (x,y) of the equation x^2 + xy - y^2 = n.

Crossrefs

Extensions

More terms from David Wasserman, Jun 17 2005

A273510 a(n) is the largest 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

25, 49, 50, 64, 81, 75, 121, 100, 169, 128, 127, 147, 157, 163, 181, 193, 199, 289, 229, 243, 239, 257, 361, 283, 293, 313, 343, 337, 349, 353, 373, 379, 397, 409, 421, 529, 439, 457, 463, 467, 487, 499, 509, 523, 541, 547, 557, 577, 625, 601, 613, 619, 631, 643, 661, 673, 677, 691, 841, 667, 733
Offset: 0

Views

Author

Gheorghe Coserea, May 23 2016

Keywords

Comments

a(10^7) = 120000007 is the largest value in the first 1+10^7 terms of the sequence.
The exception occurs first at a(150) = -1. - Georg Fischer, Feb 15 2019

Examples

			For n = 0 we have 0 = A001617(k) when k is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 16, 18, 25 (A091401); the largest of this values is 25 therefore a(0) = 25.
For n = 1 we have 1 = A001617(k) when k is 11, 14, 15, 17, 19, 20, 21, 24, 27, 32, 36, 49 (A091403); the largest of this values is 49 therefore a(1) = 49.
For n = 2 we have 2 = A001617(k) when k is 22, 23, 26, 28, 29, 31, 37, 50 (A091404); the largest of this values is 50 therefore a(2) = 50.
For n = 150 (= A054729(1)) we have 150 <> A001617(k) for all k therefore a(150) = -1.
		

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[{a, bnd}, a = Table[-1, {n+1}]; bnd = 12n + 18 Floor[Sqrt[n] ] + 100; For[k = 1, k <= bnd, k++, g = a1617[k]; If[g <= n, a[[g+1]] = k]]; a];
    seq[60] (* 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(a = vector(n+1, g, -1), bnd = 12*n + 18*sqrtint(n) + 100, g);
      for (k = 1, bnd, g = A001617(k); if (g <= n, a[g+1] = k));
      return(a);
    };
    seq(60)

Formula

Let S(n) = {k, n = A001617(k)}; if the level set S(n) is not empty then a(n) = max S(n) and A054728(n) = min S(n) and A273445(n) = card S(n), otherwise a(n) = A054728(n) = -1 and A273445(n) = 0.
Previous Showing 21-30 of 34 results. Next