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-16 of 16 results.

A250310 Numbers whose squares are of the form x^2 + y^2 + 3 where x >= y >= 0 (repetitions omitted).

Original entry on oeis.org

2, 4, 8, 10, 14, 20, 22, 26, 32, 34, 40, 44, 46, 52, 56, 58, 64, 68, 74, 80, 86, 88, 92, 94, 98, 100, 110, 112, 118, 124, 128, 130, 134, 136, 140, 142, 146, 148, 152, 158, 164, 172, 178, 184, 190, 194, 202, 206, 208, 212, 218, 220, 230, 238, 242, 244, 250, 254, 256, 266, 268, 274, 278, 290, 296, 298
Offset: 1

Views

Author

Frank M Jackson and Stalislav Takhaev, Jan 24 2015

Keywords

Comments

There exists a K-class of Heronian triangles such that the sum of the tangents of their half angles is a constant K > 1, iff K^2-3 is the sum of two squares. E.g., for K = 2 (x=1, y=0) we generate the class of integer Soddyian triangles (see A034017, A210484). For K = 4 (x=2, y=3) the class generated is Heronian triangles with the ratio of r_i : r_o : r = 1 : 3 : 6 where r is their inradius and r_i, r_o are the radii of their inner and outer Soddy circles.
Also because K^2-3 is the sum of two squares it must be congruent to 1 (mod 4). Consequently K is even.
Numbers k such that k^2-3 is in A001481. - Robert Israel, Feb 05 2019
From William P. Orrick, Nov 14 2024: (Start)
Let t = z^2 + z + 1 for some nonnegative integer z, and suppose that t = r * s for some positive integers r and s with r > s. Then (x,y) = (2*z + 1,r - s) has the property that x^2 + y^2 + 3 = (r + s)^2. Hence r + s is a member of this sequence.
Given (x,y) such that x^2 + y^2 + 3 is a square, one of x and y is odd, which we can take to be x, and the other even, which we then take to be y. Let z = (x - 1) / 2. Then 4 * (z^2 + z + 1) + y^2 is an even square, which we can call q^2. Hence z^2 + z + 1 factorizes into integer factors r = (q + y) / 2 and s = (q - y) / 2. Therefore all elements of this sequence are obtained by choosing a nonnegative integer z and a factor r of z^2 + z + 1 and forming the sum r + (z^2 + z + 1) / r.
Using the notation of the preceding two comments, the 2 by 2 matrix [[-z,r],[-s,1+z]] has both determinant and trace equal to 1, implying that it is an element of the modular group of order 3. Forming the product of the order-2 matrix [[0,-1],[1,0]] with this matrix gives the matrix [[s,-1-z],[-z,r]], which has trace r + s. Since all elements of the modular group that are a product of an element of order 2 and an element of order 3 can be obtained from a matrix of the form above by conjugation, this sequence consists of the traces of elements of the modular group that can be expressed as such a product. (This ignores the sign of the trace, which is immaterial if matrices are understood to represent fractional linear transformations.)
(End)

Examples

			a(4) = 10 as 10^2 - 3 = 9^2 + 4^2 and 10 is the 4th such occurrence.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F;
      F:= ifactors(n^2-3)[2];
      andmap(t -> t[1] mod 4 <> 3 or t[2]::even, F)
    end proc:
    select(filter, [seq(i,i=2..1000,2)]); # Robert Israel, Feb 05 2019
  • Mathematica
    lst = {}; Do[If[IntegerQ[k=Sqrt[m^2+n^2+3]], AppendTo[lst, k]], {m, 0, 1000}, {n, 0, m}]; Union@lst
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A250310_gen(): # generator of terms
        return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n**2-3).items()),count(2))
    A250310_list = list(islice(A250310_gen(),30)) # Chai Wah Wu, Jun 27 2022

Extensions

Edited by Robert Israel, Feb 05 2019

A364722 Numbers k that divide 1 + 2^m + 4^m for some m.

Original entry on oeis.org

1, 3, 7, 13, 19, 21, 37, 39, 49, 57, 61, 67, 73, 79, 91, 97, 103, 109, 111, 139, 147, 151, 163, 169, 181, 183, 193, 199, 201, 211, 219, 237, 241, 271, 273, 291, 307, 309, 313, 327, 331, 337, 343, 349, 361, 367, 373, 379, 409, 417, 421, 427, 433, 453, 463, 469, 487, 489, 507, 523, 541, 543, 547
Offset: 1

Views

Author

Robert Israel, Aug 04 2023

Keywords

Comments

If k = 3*j+1 is prime and 2^j - 1 is not divisible by k, then k is a term, as 1 + 2^j + 4^j = (2^(k-1)-1)/(2^j - 1) == 0 (mod k). - Robert Israel, Aug 06 2023

Examples

			a(4) = 13 is a term because 1 + 2^4 + 4^4 = 273 = 21 * 13 is divisible by 13.
		

Crossrefs

Subset of A034017. Cf. A364724.

Programs

  • Maple
    filter:= proc(n) local x, r;
      for r in map(t -> subs(t,x), [msolve(1+x+x^2, n)]) do
        try
          NumberTheory:-ModularLog(r,2,n);
        catch "no solutions exist": next
        end try;
        return true
      od;
      false
    end proc:
    select(filter, [seq(i,i=1..1000,2)]);
  • Python
    from itertools import count, islice
    from sympy import sqrt_mod_iter, discrete_log
    def A364722_gen(startvalue=1): # generator of terms >= startvalue
        if startvalue <= 1:
            yield 1
        if startvalue <= 3:
            yield 3
        for k in count(max(startvalue,4)):
            for d in (r>>1 for r in sqrt_mod_iter(-3,k) if r&1):
                try:
                    discrete_log(k,d,2)
                except:
                    continue
                yield k
                break
    A364722_list = list(islice(A364722_gen(),20)) # Chai Wah Wu, May 02 2024

A034018 Numbers that are represented by x^2+xy+y^2 but not primitively.

Original entry on oeis.org

4, 9, 12, 16, 25, 27, 28, 36, 48, 52, 63, 64, 75, 76, 81, 84, 100, 108, 112, 117, 121, 124, 144, 148, 156, 171, 172, 175, 189, 192, 196, 208, 225, 228, 243, 244, 252, 256, 268, 279, 289, 292, 300, 304, 316, 324, 325, 333, 336, 351, 363, 364, 372, 387, 388, 400
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A034017.

Extensions

Extended by Ray Chandler, Jan 29 2009

A034021 Numbers that are primitively but not imprimitively represented by x^2+xy+y^2.

Original entry on oeis.org

0, 1, 3, 7, 13, 19, 21, 31, 37, 39, 43, 57, 61, 67, 73, 79, 91, 93, 97, 103, 109, 111, 127, 129, 133, 139, 151, 157, 163, 181, 183, 193, 199, 201, 211, 217, 219, 223, 229, 237, 241, 247, 259, 271, 273, 277, 283, 291, 301, 307, 309, 313, 327, 331, 337, 349, 367
Offset: 1

Views

Author

Keywords

Comments

Also numbers that are squarefree and primitively represented by x^2+x*y+y^2. - Frank M Jackson, Nov 08 2013

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[k=x^2+x*y+y^2; If[(SquareFreeQ[k] && GCD[x, y]==1) || k==0, AppendTo[lst, k]], {x, 0, 100}, {y, 0, x}]; Union@lst (* Frank M Jackson, Nov 08 2013 *)

Extensions

Extended by Ray Chandler, Jan 29 2009

A316157 Positive integers Q such that there is a cubic x^3 - Qx + R that has three real roots whose continued fraction expansion have common tails.

Original entry on oeis.org

3, 7, 9, 21, 21, 39, 61, 63, 93, 129, 169, 171, 219, 273, 331, 333, 399, 471, 547, 549, 633, 723, 817, 819, 921, 1029, 1141, 1143, 1263, 1389, 1519, 1521, 1659, 1803, 1951, 1953, 2109, 2271, 2437, 2439, 2613, 2793, 2977, 2979, 3171, 3369, 3571, 3573, 3783, 3999, 4219, 4221, 4449, 4683, 4921, 4923
Offset: 1

Views

Author

Greg Dresden, Jun 25 2018

Keywords

Comments

After 3, the prime terms appear to be the primes in A275878 (namely, 7, 61, 331, 547, 1951, ...)

Examples

			For the first entry of Q=3, we have the polynomial x^3 - 3x + 1. Its roots, expressed as continued fractions, all have a common tail of 3, 2, 3, 1, 1, 6, 11, ... The next examples are Q=7 with the polynomial x^3 - 7x + 7, then Q=9 with the polynomial x^3 - 9x + 9, and Q=21 with the polynomials x^3 - 21x + 35 and x^3 - 21x + 37. Note that for the Q=7 example, we get the common tail of 2, 3, 1, 6, 10, 5, ... which is contained in A039921.
		

Crossrefs

Cf. A316184. Contained in the union of A034017 and three times A034017.

Programs

  • Mathematica
    SetOfQRs = {};
    M = 1000;
    Do[
      If[Divisible[3 (a^2 - a + 1), c^2] &&
        Divisible[(2 a - 1) (a^2 - a + 1), c^3] &&
        3 (a^2 - a + 1)/c^2 <=  M,
       SetOfQRs =
        Union[SetOfQRs, { { (3 (a^2 - a + 1))/
           c^2, ((2 a - 1) (a^2 - a + 1))/c^3}}   ]],
      {c, 1, M/3 + 1, 2}, {a, 1, Sqrt[M c^2/3 + 3/4] + 1/2}];
    Print[SetOfQRs // MatrixForm];

Extensions

More terms from Robert G. Wilson v, Jul 02 2018

A220171 An ordered subset of primitive values of x^2 + x*y + y^2 where at least two ordered pairs (x1,y1) and (x2,y2) with x1 != x2, y1 != y2 and gcd(x1,y1) = gcd(x2,y2) = 1 yield identical primitive values.

Original entry on oeis.org

91, 133, 217, 247, 259, 273, 301, 399, 403, 427, 469, 481, 511, 553, 559, 589, 637, 651, 679, 703, 721, 741, 763, 777, 793, 817, 871, 889, 903, 931, 949, 973, 1027, 1057, 1099, 1141, 1147, 1159, 1183, 1209, 1261, 1267, 1273, 1281, 1333, 1339, 1351
Offset: 1

Views

Author

Frank M Jackson, Dec 06 2012

Keywords

Comments

The primitive values of x^2 + x*y + y^2 where x >= y >= 0 and gcd(x, y) = 1 are given by A034017. However there are incidents in the sequence A034017 where different values of (x, y) yield the same primitive value. Furthermore, the number of solutions for a given primitive value equates to a power of 2. See A121940.

Examples

			a(3) = 217 because it is the 3rd incident in ascending order of the primitive x^2 + x*y + y^2 that yields multiple solutions. This happens when (x, y) = (9, 8) and (13, 3).
		

Crossrefs

Programs

  • Mathematica
    maxLen = 100; sol[k_] := Solve[m^2 + m*n + n^2 == k && m > n > 0 && GCD[m, n] == 1, Integers]; getlist[l_] := Which[Length[sol[l]] == 0, {}, True, {m, n} /. sol[l]]; list = {}; p = 1; While[Length[list] < maxLen, (While[Length[getlist[p]] < 2, p++]; list = Append[list, p]; p++)]; list

Formula

n such that n = x1^2 + x1*y1 + y1^2 = x2^2 + x2*y2 + y2^2 with x1 != x2, y1 != y2 and gcd(x1,y1) = gcd(x2,y2) = 1.
Previous Showing 11-16 of 16 results.