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

A003646 Class number of binary quadratic forms with fundamental discriminant A003658(n),n>=2.

Original entry on oeis.org

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

Views

Author

Keywords

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 236, 241.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A226165 Squarefree part of A077425(n) (numbers 4*k+1, k>=0, not a square).

Original entry on oeis.org

5, 13, 17, 21, 29, 33, 37, 41, 5, 53, 57, 61, 65, 69, 73, 77, 85, 89, 93, 97, 101, 105, 109, 113, 13, 5, 129, 133, 137, 141, 145, 149, 17, 157, 161, 165, 173, 177, 181, 185, 21, 193, 197, 201, 205, 209, 213, 217, 221, 229, 233, 237, 241, 5, 249, 253, 257, 29
Offset: 1

Views

Author

Wolfdieter Lang, Jun 14 2013

Keywords

Comments

a(n) == 1 (mod 4), n >= 1. This is because 4*k+1, k>=0, not a square, can only have an even number of odd primes of the type 3 (mod 4) with odd exponents in the prime number factorization. The squarefree part of 4*k+1 has then an even number (maybe 0) of primes of the type 3 (mod 4). Examples:
a(4) = 21 = 3*7, a(6) = 33 = 3*11.
D(n) = A077425(n) are the 1 (mod 4) discriminants of indefinite binary quadratic forms (they are the odd numbers from A079896). sqrt(D(n)) becomes then, up to an integer factor, sqrt(a(n)), which defines a real quadratic number field Q(sqrt(a(n))) with a basis <1, omega(a(n))> for the ring of integers in this field, where omega(a(n)) = (1 + sqrt(a(n)))/2. Example: sqrt(D(9)) = sqrt(45) = 3*sqrt(a(9)) = 3*sqrt(5), with omega(5) = (1 + sqrt(5))/2 (the golden section) for Q(sqrt(5)) = Q(omega(5)).

Crossrefs

Programs

  • Mathematica
    SquareFreePart[n_] := Times @@ Power @@@ ({#[[1]], Mod[#[[2]], 2]} & /@ FactorInteger[n]); SquareFreePart /@ (4*Range[65] + 1) // DeleteCases[#, 1] & (* Jean-François Alcover, Jun 14 2013 *)
  • PARI
    [core(n) | n <- vector(100,n,4*n+1), !issquare(n)] \\ Charles R Greathouse IV, Mar 11 2014

Formula

a(n) = A007913(A077425(n)).

A307372 One half of the row length of A324251: one half of the length of the reduced principal cycle for discriminant 4*D(n), with D(n) = A000037(n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 5, 2, 1, 1, 1, 3, 1, 3, 3, 2, 1, 1, 1, 2, 5, 1, 4, 2, 2, 2, 1, 1, 1, 1, 1, 3, 1, 5, 4, 3, 6, 2, 1, 1, 1, 3, 5, 3, 2, 1, 3, 7, 3, 2, 11, 2, 1, 1, 1, 5, 1
Offset: 1

Views

Author

Wolfdieter Lang, Apr 19 2019

Keywords

Comments

This is a subsequence of A226166. See the formula.
For details on the cycles for the principal form F_p(n) = FR(n), the first reduced form of the not reduced Pell form F(n) = [1, 0, -D(n)], see A324251, also for references and a W. Lang link with Table 1, last column LCR(n) = 2*a(n).

Crossrefs

Formula

a(n) equals one half of the length of the reduced principal cycle of discriminant 4*D(n), with D(n) = A000037(n), for n >= 1.
a(n) = A226166(e(n)), where e(n) is the n-th even term of A079896, for n >= 1.

A081650 Least nonsquare whose remainder modulo k^2 is a square for all 0 < k <= n.

Original entry on oeis.org

2, 5, 13, 73, 409, 801, 1584, 2241, 30601, 30601, 78409, 156825, 862416, 862416, 7929009, 28173825, 196668004, 196668004
Offset: 1

Views

Author

Robert G. Wilson v, Mar 26 2003

Keywords

Comments

See A260709 for the (maybe more natural) variant of squares (mod k^2) instead of remainders equal to a square. - M. F. Hasler, Nov 17 2015

Examples

			a(3) = 13 because for (mod 1) (A000037) is the set of all nonsquares, for (mod 4) (A079896) is the set beginning {5, 8, 12, 13, 17, 20, 21, 24, 28, 29, ...} and for (mod 9) (A081642) is the set beginning {10, 13, 18, 19, 22, 27, 28, 31, 37, 40, ...}. The first element of the intersection of these three sets is 13.
		

References

  • Mark A. Herkommer, Number Theory, A Programmer's Guide, McGraw-Hill, New York, 1999, page 315.

Crossrefs

Programs

  • MATLAB
    N = 10^8;  % to get all terms <= N
    B = ones(1,N);
    B([1:floor(sqrt(N))].^2) = 0;
    m = 1;
    while true
      nsq = ones(m^2,1);
      nsq([1:m].^2)=0;
      S = nsq * ones(1,ceil(N/m^2));
      S = reshape(S,1,numel(S));
      B(S(1:N)>0) = 0;
      v = find(B,1,'first');
      if numel(v) == 0
        break
      end
      A(m) = v;
      m = m + 1;
    end
    A  % Robert Israel, Nov 17 2015
  • Maple
    M:= 0:
    for m from 2 while M < 15 do
       if (not issqr(m)) and andmap(issqr, [seq(m mod k^2, k=1..M+1)]) then
           A[M+1]:= m;
           for k from M+2 while issqr(m mod k^2) do A[k]:= m od:
           M:= k-1;
       fi
    od:
    seq(A[m],m=1..15); # Robert Israel, Nov 17 2015
  • PARI
    t=2; for(n=1,50, for(m=t,10^9, if(issquare(m), next); f=0; for(k=1,n,if(!issquare(m % k^2),f=1;break)); if(!f,print1(m","); t=m; break)))
    
  • PARI
    A081650(n,t=2)=for(m=t,9e9,issquare(m)&&next; for(k=1,n,issquare(m%k^2)||next(2));return(m)) \\ The 2nd optional arg allows us to give a lower search limit, useful since a(n+1) >= a(n) by definition: see usage below.
    t=2;for(n=1,50, print1(t=A081650(n,t),",")) \\ M. F. Hasler, Nov 17 2015
    

Extensions

Edited by Ralf Stephan, Mar 27 2003
Definition corrected and original PARI code updated by M. F. Hasler, Nov 17 2015
a(16) to a(18) from Robert Israel, Nov 17 2015

A227453 Numbers k such that the distance to the largest square less than k is a multiple of 4.

Original entry on oeis.org

8, 13, 20, 24, 29, 33, 40, 44, 48, 53, 57, 61, 68, 72, 76, 80, 85, 89, 93, 97, 104, 108, 112, 116, 120, 125, 129, 133, 137, 141, 148, 152, 156, 160, 164, 168, 173, 177, 181, 185, 189, 193, 200, 204, 208, 212, 216, 220, 224, 229, 233, 237, 241, 245, 249, 253, 260, 264, 268, 272, 276, 280
Offset: 1

Views

Author

Ralf Stephan, Sep 22 2013

Keywords

Comments

A071797(a(n)) = 4*m, A053186(a(n)+1) = 4*m, m > 0.
Apparently a bisection of A079896. While it may not be difficult to prove that the sequence is a subsequence of A079896, the apparent fact that a(n) = A079896(2n-1) is by no means obvious.

Examples

			8 - 2^2 = 1*4 and 24 - 4^2 = 2*4 so 8 and 24 are in the sequence.
		

Crossrefs

Programs

  • Mathematica
    lsm4Q[n_]:=Module[{s=Floor[Sqrt[n]]^2},sHarvey P. Dale, Jun 20 2014 *)
  • PARI
    is(n)=(n-sqrtint(n-1)^2)%4==0

A307236 One half of the number of primitive reduced binary quadratic forms for discriminant 4*A000037(n), for n >= 1.

Original entry on oeis.org

1, 2, 1, 2, 4, 2, 4, 2, 2, 5, 4, 4, 1, 2, 6, 2, 6, 6, 4, 6, 4, 2, 4, 5, 6, 8, 4, 4, 10, 4, 7, 2, 8, 6, 3, 4, 10, 8, 6, 12, 4, 4, 4, 8, 6, 5, 6, 8, 6, 6, 12, 6, 10, 11, 4, 4, 6, 8, 10, 2, 8, 10, 8, 8, 7, 8, 8, 12, 6, 8, 16, 6, 10, 2, 6, 12, 10, 4, 12, 5
Offset: 1

Views

Author

Wolfdieter Lang, Mar 30 2019

Keywords

Comments

This is a subset of one half of A082174. See the formula.
This sequence is also one half of the total length of the A307359(n) cycles for discriminant 4*D(n), with D(n) = A000037(n). See the W. Lang link in A324251, Table 2, last column SigmaL(n) = 2*a(n). - Wolfdieter Lang, Apr 19 2019

Examples

			a(5) = 4 because the fifth even term of A079896 is at position e(5) = 8, and A082174(8)/2 = 4.
The 2*a(5) = 8 primitive reduced forms for discriminant 4*A000037(5) = 4*7 = 28 are [[-2, 2, 3], [2, 2, -3], [-3, 2, 2], [3, 2, -2], [-1, 4, 3], [1, 4, -3], [-3, 4, 1], [3, 4, -1]].
The preceding 8 forms give the 2 = A307359(5) 4-cycles CR(5) = [[1, 4, -3], [-3, 2, 2], [2, 2, -3], [-3, 4, 1]], the principal cycle with the principal reduced form [1, 4, -3], and the 4-cycle obtained from this by a sign flip of the outer form entries. - _Wolfdieter Lang_, Apr 19 2019
		

Crossrefs

Formula

a(n) = A082174(e(n))/2, with e(n) the position of the n-th even term of A079896.

A107996 Integers m congruent to 5 modulo 8 such that the minimal solution of the Pell equation x^2 - m*y^2 = +-4 has both x and y odd.

Original entry on oeis.org

5, 13, 21, 29, 45, 53, 61, 69, 77, 85, 93, 109, 117, 125, 133, 149, 157, 165, 173, 181, 205, 213, 221, 229, 237, 245, 253, 261, 277, 285, 293, 301, 309, 317, 341, 357, 365, 397, 413, 421, 429, 437, 445, 453, 461, 469, 477, 493, 501, 509, 517, 525, 533, 541
Offset: 1

Views

Author

Steven Finch, Jun 13 2005

Keywords

Comments

From Wolfdieter Lang, Oct 30 2015: (Start)
These numbers m are the members of A079896 that have two conjugacy classes of proper solutions (and one of improper solutions) for the Pell equation x^2 - m*y^2 = +4. E.g., m = 5 has the proper positive fundamental solutions (3,1) and (7,3) obtained from (3,-1) (and the improper positive fundamental solution (18,8) = 2*(9,4) obtained from (2,0)).
For these numbers m one has therefore two conjugacy classes of improper solutions, and, in addition, the improper ambiguous class with member (4, 0) for the equation X^2 - m*Y^2 = +16.
Note that also even m may have solutions with both x and y odd, e.g., m = 12 with minimal positive solution (x, y) = (4, 1) for the +4 equation. The +-4 in the name means +4 or -4 (inclusive).
(End)

Crossrefs

Cf. A079896.

A178612 Positive numbers of the form p^6 - 4*p^4*q + 4*p^2*q^2 + 4*q^3 (and p*q <> 0).

Original entry on oeis.org

5, 20, 32, 41, 124, 133, 140, 160, 189, 224, 257, 265, 284, 292, 305, 320, 445, 509, 581, 644, 673, 945, 985, 1076, 1085, 1120, 1280, 1345, 1436, 1489, 1541, 1597, 1708, 1772, 1917, 2048, 2237, 2273, 2336, 2345, 2489, 2624, 2749, 2889, 2980, 3105, 3140, 3205
Offset: 1

Views

Author

Artur Jasinski, May 30 2010

Keywords

Comments

Conjecture: There are no perfect squares in this sequence (in spite of all numbers being congruent to 0 or 1 mod 4).
If any perfect square occurred in this sequence then a septic trinomial x^7 + A*x^2 + B with two irreducible factors of degree 3 and 4 would exist.
This sequence is a subsequence of A079896.

Crossrefs

Cf. A079896.

Programs

  • Magma
    is_A178612 := function(k)
        R := PolynomialRing(Integers());
        for s in Solutions(Thue(x^3 - 4*x^2 + 4*x + 4), k) do
            if (s[1]*s[2]) ne 0 and IsSquare(s[1]) then return true; end if;
        end for;
        return false;
    end function;
    [k : k in [1..1000] | is_A178612(k)];  // Robin Visser, Aug 26 2025
  • Mathematica
    aa = {}; Do[Do[kk = p^6 - 4 p^4 q + 4 p^2 q^2 + 4 q^3; If[(kk > 0) && (p q != 0), AppendTo[aa, kk]], {p, 1, 200}], {q, -200, 200}]; Take[Union[aa], 100]

A226164 Sequence used for the quadratic irrational number belonging to the principal indefinite binary quadratic form.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 5, 6, 6, 7, 6, 7, 6, 7, 7, 8, 7, 8, 7, 8, 7, 8, 8, 9, 8, 9, 8, 9, 8, 9, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 12, 13, 12, 13, 12, 13, 12, 13, 12
Offset: 1

Views

Author

Wolfdieter Lang, Jul 20 2013

Keywords

Comments

For an indefinite binary quadratic form, denoted by [a, b, c] for F = F([a, b, c],[x, y]) = a*x^2 + b*x*y + c*y^2, the discriminant is D = b^2 - 4*a*c > 0, not a square. See A079896 for the possible values.
The principal form for a discriminant D, which is reduced (see the Scholz-Schoeneberg reference, p. 112), is defined as the unique form F_p(D) = [a=1, b(D), c(D)] with c(D) = -(D - b^2)/4. See the Buell reference, p. 26. One can show that b(D) = f(D) - 2 if D and f(D):=ceiling(sqrt(D(n))) have the same parity and b(D) = f(D) - 1 if D and f(D) have opposite parity. The principal root of a form [a, b, c] of discriminant D is omega(D) = (-b + sqrt(D))/2, the zero with positive square root of the polynomial P(x) = a*x^2 + b*x + c. See the Buell reference, p. 31 (and p. 18). We prefer to call omega the quadratic irrational belonging to the form F. For the principal form F_p(D) of discriminant D = D(n) = A079896(n), n >= 1, this quadratic irrational is omega_p(D(n)) = (-b(D(n)) + sqrt(D))/2 where b(D(n)) is the present sequence a(n). (Note that this differs from the omega = omega(D) used in the Buell reference on p. 40 because another form of discriminant D has been chosen there, depending on the parity of D.)
The (purely periodic) continued fraction expansion of omega_p(D(n)) plays a role for finding all solutions of the Pell equation x^2 + D(n)*y^2 = - 4 if a solution exists. See A226696 for these D values. For the Pell +4 equation which has solutions for every D(n) one finds the fundamental solution also from the continued fraction expansion of omega_p(D(n)).
For more details see the W. Lang link "Periods of indefinite Binary Quadratic Forms ..." given in A225953.

Examples

			a(1) = 1 because D(1) = A079896(1) = 5 and f(1) = 3; both are odd, therefore a(1) = 3 - 2 = 1.
a(2) = 2 from D(2) = 8, f(2) = 3, a(2) = f(2) - 1 = 2.
The quadratic irrational (principal root) of the principal form of discriminant D(5) = 17 which is F_p(17) = [1, 3, -2], is omega_p(17) = (-3 + sqrt(17))/2 approximately 0.561552813.
  f(17) = 5, a(5) = 5 - 2 = 3 = b(17).
		

References

  • D. A. Buell, Binary Quadratic Forms, Springer, 1989.
  • A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, Sammlung Goeschen Band 5131, Walter de Gruyter, 1973.

Crossrefs

Programs

  • SageMath
    def a(n):
        i, D = 1, Integer(5)
        while(i < n):
            D += 1; i += 1*(((D%4) in [0, 1]) and (not D.is_square()))
        return ceil(sqrt(D))-1-1*(D%2==ceil(sqrt(D))%2)  # Robin Visser, Jun 07 2025

Formula

Define D(n) := A079896(n) and f(n) = ceiling(sqrt(D(n))).
a(n) = f(n) - 2 if D(n) and f(n) have the same parity, and a(n) = f(n) - 1 if D(n) and f(n) have opposite parity.

Extensions

Offset corrected by Robin Visser, Jun 07 2025

A372519 Nonnegative numbers k such that 0 = Sum_{j=0..k} K(k, j) where K(k, j) is the Kronecker symbol (k / j).

Original entry on oeis.org

0, 3, 5, 8, 12, 13, 17, 18, 20, 21, 24, 27, 28, 29, 32, 33, 37, 40, 41, 43, 44, 45, 48, 52, 53, 56, 57, 60, 61, 65, 68, 69, 72, 73, 76, 77, 80, 84, 85, 88, 89, 92, 93, 96, 97, 101, 104, 105, 108, 109, 112, 113, 116, 117, 120, 124, 125, 126, 128, 129, 132, 133
Offset: 1

Views

Author

Peter Luschny, May 16 2024

Keywords

Crossrefs

Programs

  • Maple
    K := (n, k) -> NumberTheory:-KroneckerSymbol(n, k):
    isA := n -> local k; evalb(0 = add(K(n, k), k = 0..n)):
    select(isA, [seq(0..133)]);
  • PARI
    isok(k) = sum(j=0, k, kronecker(k,j)) == 0; \\ Michel Marcus, May 17 2024
Previous Showing 31-40 of 41 results. Next