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 31 results. Next

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)}.

A350871 Number of well-rounded sublattices of index n in square lattice.

Original entry on oeis.org

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

Views

Author

Andrey Zabolotskiy, Jan 20 2022

Keywords

Comments

A sublattice is well-rounded if the linear span of its vectors of minimal length is the whole space.
A sublattice of the square lattice is well-rounded when it is square or centered rectangular (rhombic) with not too oblong unit cell: the angles of the rhombus should be at least Pi/3.
In this sequence, any two sublattices differing by any isometry are counted as distinct.

Examples

			a(4) = 1 well-rounded index-4 sublattice has basis (2, 0), (0, 2).
a(5) = 2 w.-r. index-5 sublattices have bases (2, 1), (-1, 2) and (1, 2), (-2, 1).
At index 12, for the first time centered rectangular sublattices occur, there are a(12) = 2 of them with the bases (3, 2), (3, -2) and (2, 3), (-2, 3).
		

Crossrefs

Cf. enumeration of other classes of sublattices of Z^2: A000203 (all sublattices), A002654 (square sublattices), A000089 (primitive square sublattices), A350872 (coincidence sublattices), A145393 (all sublattices up to isometries of the parent lattice).
Cf. A097584.

Programs

  • Mathematica
    fa[s_] := Count[Divisors[s], _?(#^2 < (s/#)^2 < 3 #^2 &)];
    f0[s_] := If[OddQ[s], 0, 2 fa[s/2]];
    f1[s_] := With[{e2 = IntegerExponent[s, 2]}, 2 (-1)^e2 fa[s/2^e2]];
    pr[s_] := Count[Range[s], _?(Mod[#^2 + 1, s] == 0 &)]; (*A000089*)
    sq[n_] := Sum[pr[n/d^2], {d, Select[Range[n], Mod[n, #^2] == 0 &]}]; (*A002654*)
    a[n_] := sq[n] + Sum[pr[n/d] (f0[d] + f1[d]), {d, Divisors[n]}];
    Array[a, 87]

Formula

See Zeiner (2015), Theorem 7.3.1. [Note that the formula from Baake & Zeiner (2017) contains an error.]

A087782 a(n) = number of solutions to x^3 + x == 0 (mod n).

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 1, 1, 1, 6, 1, 1, 3, 2, 3, 1, 3, 2, 1, 3, 1, 2, 1, 1, 3, 6, 1, 1, 3, 6, 1, 1, 1, 6, 3, 1, 3, 2, 3, 3, 3, 2, 1, 1, 3, 2, 1, 1, 1, 6, 3, 3, 3, 2, 3, 1, 1, 6, 1, 3, 3, 2, 1, 1, 9, 2, 1, 3, 1, 6, 1, 1, 3, 6, 3, 1, 1, 6, 1, 3, 1, 6, 1, 1, 9, 2, 3, 1, 3, 6, 3, 1, 1, 2, 3, 1, 3, 2, 1, 3, 3, 6, 1, 3, 3
Offset: 1

Views

Author

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

Keywords

Comments

Shadow transform of A034262. - Michel Marcus, Jun 06 2013

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 1, 1, Product[{p, e} = pe; If[p == 2, If[e == 1, 2, 1], If[Mod[p, 4] == 1, 3, 1]], {pe, FactorInteger[n]}]];
    a /@ Range[1, 100] (* Jean-François Alcover, Sep 20 2019 *)
  • PARI
    a(n)={my(v=vector(n)); sum(i=0, n-1, lift(Mod(i,n)^3 + i) == 0)} \\ Andrew Howroyd, Jul 15 2018
    
  • PARI
    a(n)={my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); if(p==2, if(e==1, 2, 1), if(p%4==1, 3, 1)))} \\ Andrew Howroyd, Jul 15 2018

Formula

Multiplicative with a(2^1) = 2, a(2^e) = 1 for e > 1, a(p^e) = 3 for p mod 4 == 1, a(p^e) = 1 for p mod 4 == 3. - Andrew Howroyd, Jul 15 2018

Extensions

More terms from David Wasserman, Jun 17 2005

A185278 Number of isomorphism classes of generalized Petersen graphs G(n,k) on 2n vertices with gcd(n,k) = 1.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 4, 2, 3, 3, 5, 2, 5, 3, 4, 3, 6, 4, 6, 4, 5, 4, 8, 3, 8, 5, 6, 5, 7, 4, 10, 5, 7, 6, 11, 4, 11, 6, 7, 6, 12, 6, 11, 6, 9, 7, 14, 5, 11, 8, 10, 8, 15, 6, 16, 8, 10, 9, 14, 6, 17, 9, 12, 7, 18, 8, 19, 10, 11, 10, 16, 7, 20, 10, 14, 11, 21, 8, 18, 11, 15, 12, 23, 7, 19, 12, 16, 12, 19, 10, 25, 11, 16, 11
Offset: 3

Views

Author

N. J. A. Sloane, Feb 19 2011

Keywords

Crossrefs

Programs

Formula

a(n) = (A000010(n) + A060594(n) + A000089(n))/4.

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.

A276181 Fricke's 37 cases for two-valued modular equations.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 35, 36, 39, 41, 47, 49, 50, 59, 71
Offset: 1

Views

Author

Gheorghe Coserea, Oct 17 2016

Keywords

Crossrefs

Programs

  • 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;
    A276183(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);
    };
    select(x->(x>1), Vec(select(x->x==0, vector(100, n, A276183(n)), 1)))

Formula

Numbers n>1 such that 0 = A276183(n).

A385104 Triangle read by rows: T(n,k) is the number of residue classes obtained by solving mod(x^2,n) = k for x over the integers, n >= 1, k >= 0.

Original entry on oeis.org

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

Views

Author

Jason Bard, Jun 18 2025

Keywords

Comments

The sum of each row is n.

Examples

			Triangle starts:
  1
  1 1
  1 2 0
  2 2 0 0
  1 2 0 0 2
  1 2 0 1 2 0
  1 2 2 0 2 0 0
  2 4 0 0 2 0 0 0
  3 2 0 0 2 0 0 2 0
  1 2 0 0 2 1 2 0 0 2
  ...
		

Crossrefs

Programs

  • Mathematica
    dat[n_] := Table[Reduce[Mod[x^2, n] == k, x, Integers], {k, 0, n - 1}]; countConditions[cond_] := Which[cond === False, 0, MatchQ[cond, x \[Element] Integers], 1, True, Length@Cases[cond, Equal[x, _], Infinity]]; counts = Flatten[Table[countConditions /@ dat[n], {n, 1, 20}]]
  • PARI
    T(n, k) = sum(i=1, n, Mod(i,n)^2 == k);
    row(n) = vector(n, i, T(n, i-1)); \\ Michel Marcus, Jun 23 2025

Formula

T(n,0) = A000188(n).
T(n,1) = A060594(n).
T(n,n-1) = A000089(n).

A087785 Number of elements in GL(2,Z_n) x with x^2 == -I mod n where I is the identity matrix.

Original entry on oeis.org

1, 4, 6, 12, 32, 24, 42, 48, 54, 128, 110, 72, 184, 168, 192, 192, 308, 216, 342, 384, 252, 440, 506, 288, 752, 736, 486, 504, 872, 768, 930, 768, 660, 1232, 1344, 648, 1408, 1368, 1104, 1536, 1724, 1008, 1806, 1320, 1728, 2024, 2162, 1152, 2058, 3008, 1848
Offset: 1

Views

Author

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

Keywords

Crossrefs

Extensions

More terms from David Wasserman, Jun 17 2005

A276184 Numbers n such that A276183(n) = 1.

Original entry on oeis.org

22, 28, 30, 33, 34, 37, 38, 40, 43, 44, 45, 48, 51, 53, 54, 55, 56, 61, 63, 64, 65, 75, 79, 81, 83, 89, 95, 101, 119, 131
Offset: 1

Views

Author

Gheorghe Coserea, Oct 22 2016

Keywords

Crossrefs

Cf. A276183.

Programs

  • 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;
    A276183(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);
    };
    Vec(select(x->x==1, vector(5000, n, A276183(n)), 1))

A276185 Numbers n such that A276183(n) = 2.

Original entry on oeis.org

42, 46, 52, 57, 62, 67, 68, 69, 72, 73, 74, 77, 80, 87, 91, 98, 103, 107, 111, 121, 125, 143, 167, 191
Offset: 1

Views

Author

Gheorghe Coserea, Oct 22 2016

Keywords

Crossrefs

Cf. A276183.

Programs

  • 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;
    A276183(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);
    };
    Vec(select(x->x==2, vector(500, n, A276183(n)), 1))
Previous Showing 21-30 of 31 results. Next