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 41-45 of 45 results.

A034025 Both primitively and imprimitively represented by x^2+y^2.

Original entry on oeis.org

25, 50, 125, 169, 250, 289, 325, 338, 425, 578, 625, 650, 725, 841, 845, 850, 925, 1025, 1250, 1325, 1369, 1445, 1450, 1525, 1625, 1681, 1682, 1690, 1825, 1850, 2050, 2125, 2197, 2225, 2425, 2525, 2650, 2725, 2738, 2809, 2825, 2873, 2890
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    okQ[n_] := (xy = {x, y} /. {ToRules[Reduce[n == x^2 + y^2, {x, y}, Integers]]}; cnt = Count[xy, {x_, y_} /; GCD[x, y] == 1]; Length[xy] > cnt > 0); Reap[For[n = 1, n <= 3000, n++, If[okQ[n], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Jan 25 2013 *)

A165186 a(n) = Sum_{k=1..n} (k*(n-k) mod n).

Original entry on oeis.org

0, 1, 4, 6, 10, 17, 28, 36, 30, 45, 66, 82, 78, 105, 140, 136, 136, 141, 190, 230, 238, 253, 322, 380, 250, 325, 360, 434, 406, 505, 558, 592, 572, 561, 700, 678, 666, 741, 910, 980, 820, 917, 946, 1122, 1050, 1173, 1316, 1432, 1078, 1125, 1394, 1430, 1378, 1449
Offset: 1

Views

Author

Wouter Meeussen, Sep 06 2009

Keywords

Comments

Comment from Max Alekseyev, Nov 22 2009: For a prime p==3 (mod 4), a(p) = p*h(-p) + p*(p-1)/2 where h(-p) is the class number (listed in A002143). For example, h(-19)=1 and a(19) = 19*1 + 19*18/2 = 190.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Mod[k (n-k),n],{k,n}],{n,100}]

A335558 Positive integers that cannot be expressed as the sum of at most 5 pairwise coprime squares.

Original entry on oeis.org

21, 22, 23, 24, 33, 45, 46, 47, 48, 57, 69, 70, 71, 72, 81, 93, 94, 95, 96, 105, 117, 118, 119, 120, 129, 141, 142, 143, 144, 153, 154, 161, 165, 166, 167, 168, 177, 189, 190, 191, 192, 201, 209, 213, 214, 215, 216, 217, 225, 237, 238, 239, 240, 246, 249, 261
Offset: 1

Views

Author

XU Pingya, Jun 14 2020

Keywords

References

  • R. K. Guy, Unsolved Problems in Number Theory, C20.

Crossrefs

Programs

  • Mathematica
    n = 261;
    a1 = Prime[Range[6]]^2; a2 = a3 = a4 = a5 = {};
    Do[If[GCD[x, y] == 1, AppendTo[a2, x^2 + y^2]], {x, 0, (n/2)^(1/2)}, {y, x, (n - x^2)^(1/2)}];
    Do[If[GCD[x, y] == GCD[x, z] == GCD[y, z] == 1, AppendTo[a3, x^2 + y^2 + z^2]], {x, 0, (n/3)^(1/2)}, {y, x, ((n - x^2)/2)^(1/2)}, {z, y, (n - x^2 - y^2)^(1/2)}];
    Do[If[GCD[x, y] == GCD[x, z] == GCD[x, t] == GCD[y, z] == GCD[y, t] == GCD[z, t] == 1, AppendTo[a4, x^2 + y^2 + z^2 + t^2]], {x, 0, (n/4)^(1/2)}, {y, x, ((n - x^2)/3)^(1/2)}, {z, y, ((n - x^2 - y^2)/2)^(1/2)}, {t, z, (n - x^2 - y^2 - z^2)^(1/2)}];
    Do[If[GCD[x, y] == GCD[x, z] == GCD[x, t] == GCD[x, w] == GCD[y, z] == GCD[y, t] == GCD[y, w] == GCD[z, t] == GCD[z, w] == GCD[t, w] == 1, AppendTo[a5, x^2 + y^2 + z^2 + t^2 + w^2]], {x, 0, (n/5)^(1/2)}, {y, x, ((n - x^2)/4)^(1/2)}, {z, y, ((n - x^2 - y^2)/3)^(1/2)}, {t, z, ((n - x^2 - y^2 - z^2)/2)^(1/2)}, {w, t, (n - x^2 - y^2 - z^2 - t^2)^(1/2)}];
    Complement[Range[n], Union@Join[a1, a2, a3, a4, a5]]

A341420 The positive integer numbers k represented properly by the binary quadratic form x^2 + 4*y^2.

Original entry on oeis.org

1, 4, 5, 8, 13, 17, 20, 25, 29, 37, 40, 41, 52, 53, 61, 65, 68, 73, 85, 89, 97, 100, 101, 104, 109, 113, 116, 125, 136, 137, 145, 148, 149, 157, 164, 169, 173, 181, 185, 193, 197, 200, 205, 212, 221, 229, 232, 233, 241, 244, 257, 260, 265, 269, 277, 281, 289, 292, 293, 296
Offset: 1

Views

Author

Wolfdieter Lang, Mar 19 2021

Keywords

Comments

If also improper solutions of the Diophantine equation X^2 + Y^2 = k, with positive integer number k are taken into account one can obtain the present solutions provided X or Y are even. E.g., k = 4 has only improper solutions like (X, Y) = (0, pm2) or (pm2, 0) (pm stands for +1 or -1). So 4 is not a member of A008784, but in the present sequence it appears from (x, y) = (0, pm1) obtained from the first (X, Y) solution by y = Y/2.
The number k = 2 = A008784(2) is not represented here because there is only the proper solution (X, Y) = (pm1, pm1).
The number of solutions m(k = a(n)), up to an overall sign change in x and y, is given by m(1) = 1, m(4) = 1, m(8) = 2 and for k = 4^a*8^b*Product_{j=1..P1} (p1_j)^e1_j, with (a,b) from {(0, 0), (1, 0), (0, 1)}}, primes p1_j congruent to 1 (mod 4) (from A002144) and nonnegative exponents e1_j, it is m(k) = 2^(b + P1).
The primitive parallel binary quadratic forms of discriminant -16 = -4*4 representing positive integer numbers k are obtained by solving the Diophantine equation j^2 + 4 == 0 (mod k), for j from {0, 1, ..., k-1}. This gives for k = 1, 2, 4, and 8 the solutions j = 0, 0, {0, 2}, and {2, 6}, respectively. No larger powers of 2 have solutions. No lifting is possible (see Apostol, Theorem 5.30). For odd primes k the Legendre symbol (-4, k) = +1 exactly for k = prime == 1 (mod 4) (from the Legendre symbol (-1, prime) = +1 only for these primes A008784).
These parallel forms are given by (k, 2*j(k), c(j(k))), with c(j(k)) = (j(k)^2 + 4)/k.
There is only one primitive reduced form for discriminant -16, namely the principal form (1, 0, 4) (see the Buell reference p. 20). Thus each parallel form is equivalent (with a determinant +1 transformation) to this principal form, and gives a proper solution.

Examples

			Proper solutions (x, y) (up to overall sign flip) for various k = a(n):
a(2) = 4: (1, 0), m(4) = 1 (a = 1, b = 0, P1 = 0), (2, 0) is not a proper solution);
a(4) = 8: (2, pm1): (pm stands for +1 or -1), m(8) = 2 (a = 0, b = 1, P1 = 0);
a(7) = 20 = 4*5: (4, pm1), m(20) = 2 (a = 1, b = 0, P1 = 1), (m(4) = 1);
a(8) = 25 = 5^2: (3, pm2), m(25) = 2 (a = 0, b = 0, P1 = 1);
a(42) = 200 = 8*5^2: (2, pm7), (14, pm1), m(200) = 4 (a = 0, b = 1, P1 = 1).
		

References

  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, pp. 120-122.
  • D. A. Buell, Binary Quadratic Forms, Springer, 1989, p. 20.

Crossrefs

Cf. Discriminants -4: A008784, -8 A057127, -12 A244819.

Formula

a(n) = x(n)^2 + (2*y(n))^2, with gcd(x(n), y(n)) = 1, for n >= 1.

A386516 Least k such that k^2+1 contains exactly n distinct prime factors of the form m^2+1 or 0 if no such k exists.

Original entry on oeis.org

1, 3, 13, 183, 2843, 41323, 57109753, 1929510527, 760999599793
Offset: 1

Views

Author

Michel Lagneau, Jul 24 2025

Keywords

Examples

			a(4)=183 because the prime factors of 183^2+1 are {2, 5, 17, 197} are of the form m^2+1 with m = 1, 2, 4 and 14.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=10^6:
    for n from 0 to 6 do :
     ii :=0 :
     for k from 0 to nn while(ii=0) do :
       d:=factorset(k^2+1):n0:=nops(d):it:=0:
        for i from 1 to n0 do:
          c:=d[i]-1:if sqrt(c) = floor(sqrt(c)) then it:=it+1:else fi:
        od:
         if it =n then ii :=1 :printf (`%d %d \n`,n,k):
          else
         fi :
     od:
    od :
  • Mathematica
    a[n_]:=Module[{k=0},Until[PrimeNu[k^2+1]==n&&AllTrue[Sqrt[First/@FactorInteger[k^2+1]-1],IntegerQ],k++];k];Array[a,6] (* James C. McMahon, Jul 25 2025 *)

Extensions

a(7) from Giovanni Resta, Jul 24 2025
a(8)-a(9) from David A. Corneth, Jul 24 2025
Previous Showing 41-45 of 45 results.