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.

User: Alexander Kritov

Alexander Kritov's wiki page.

Alexander Kritov has authored 5 sequences.

A349538 The number of pseudo-Pythagorean triples (which allow negative or 0 sides) on a 2D lattice that are on or inside a circle of radius n.

Original entry on oeis.org

1, 5, 9, 13, 17, 29, 33, 37, 41, 45, 57, 61, 65, 77, 81, 93, 97, 109, 113, 117, 129, 133, 137, 141, 145, 165, 177, 181, 185, 197, 209, 213, 217, 221, 233, 245, 249, 261, 265, 277, 289, 301, 305, 309, 313, 325, 329, 333, 337, 341, 361, 373, 385, 397, 401, 413, 417, 421, 433, 437, 449
Offset: 0

Author

Alexander Kritov, Nov 21 2021

Keywords

Comments

Consider a 2D lattice, where the Cartesian coordinates x and y are legs of the Pythagorean triangle. Thus the notion of Pythagorean triple is extended to the cases when sides x, y are in Z (i.e., sides also include negative integers and zero). The sequence gives the number of such triples on or inside a circle of radius n.
Partial sums of A046109.

Examples

			Sides (coordinates)                                                       a(n)
------------------------------------------------------------------------------
(0,0)                                                                       1
(-1,0)(0,-1)(0,1)(1,0)                                                      5
(-2,0)(0,-2)(0,2)(2,0)                                                      9
(-3,0)(0,-3)(0,3)(3,0)                                                     13
(-4,0)(0,-4)(0,4)(4,0)                                                     17
(-5,0)(-4,-3)(-4,3)(-3,-4)(-3,4)(0,-5)(0,5)(3,-4)(3,4)(4,-3)(4,3)(5,0)     29
(-6,0)(0,-6)(0,6)(6,0)                                                     33
(-7,0)(0,-7)(0,7)(7,0)                                                     37
(-8,0)(0,-8)(0,8)(8,0)                                                     41
(-9,0)(0,-9)(0,9)(9,0)                                                     45
(-10,0)(-8,-6)(-8,6)(-6,-8)(-6,8)(0,-10)(0,10)(6,-8)(6,8)(8,-6)(8,6)(10,0) 57
(-11,0)(0,-11)(0,11)(11,0)                                                 61
(-12,0)(0,-12)(0,12)(12,0)                                                 65
		

Crossrefs

Cf. A046080, A211432, A046109 (first differences), A349536 (in 1/8 sector).

Programs

  • C
    /* See links */
    
  • PARI
    f(n) = if(n==0, return(1)); my(f=factor(n)); 4*prod(i=1, #f~, if(f[i, 1]%4==1, 2*f[i, 2]+1, 1)); \\ A046109
    a(n) = sum(k=0, n, f(k)); \\ Michel Marcus, Nov 27 2021

Formula

a(n) = (A211432(n) + 1)/2.
a(n) = a(n-1) + 4 + 8*A046080(n).

A349536 Consider a circle on the Z X Z lattice with radius equal to the Pythagorean hypotenuse h(n) (A009003); a(n) = number of Pythagorean triples inside a Pi/4 sector of the circle.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32, 33, 34, 35, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 75, 76, 77, 78, 79, 80, 84, 85, 86, 87, 89
Offset: 1

Author

Alexander Kritov, Nov 21 2021

Keywords

Comments

Number of Pythagorean triples with hypotenuse less than or equal to the next one.

Examples

			The count of non-primitive Pythagorean triples as they appear in order of increasing hypotenuse:
.
       Hypotenuse
   n  (A009003(n))       Sides       a(n)
  --  ------------  ---------------  ----
   1        5            (3,4)         1
   2       10            (6,8)         2
   3       13            (5,12)        3
   4       15            (9,12)        4
   5       17            (8,15)        5
   6       20           (12,16)        6
   7       25       (7,24), (15,20)    8
   8       26           (10,24)        9
   9       29           (20,21)       10
		

References

  • W. Sierpinski, Pythagorean Triangles, Dover Publications, 2003.

Crossrefs

Cf. A349538 (extension to the full circle of Z^2 lattice).

Programs

  • C
    // see enclosed main.c
    for (long j=1;j< 101;++j)
    {
    for (long k=1;k< 101;++k)
    {
    if (k<=j)   // to avoid pairs (as we need 1/8 or quarter plane)
        {
              double hyp=sqrt(j*j+k*k);
              double c= (double) floor (hyp );
    if   (fabs(hyp - c) < DBL_EPSILON)  arr[r++]= (long) c;
    }}}
    bubbleSort(arr, r);//sort by hypotenuse increase
    for (long j=0;j< r;++j)
    {
       if  ( arr[j] != arr[j+1] )
        {
            // write to file: j is the sequence value a[n]*2
            // arr[j] is the hypotenuse value
        }
    }

Formula

Conjecture: the increment is a(n+1) - a(n) = 2^(m-1), where m is the sum of all powers of the Pythagorean primes (A002144) in the factorization of hypotenuse h(n+1) (see Eckert for PPT). However, starting from 58 the increment is 3.

A348169 Positive integers which can be represented as A*(x^2 + y^2 + z^2) = B*(x*y + x*z + y*z) with positive integers x, y, z, A, B and gcd(A,B)=1.

Original entry on oeis.org

3, 12, 18, 27, 30, 42, 48, 72, 75, 77, 98, 108, 120, 147, 154, 162, 168, 192, 243, 255, 260, 264, 270, 272, 273, 285, 288, 297, 300, 308, 338, 363, 378, 392, 432, 450, 462, 480, 490, 494, 507, 510, 513, 588, 616, 630, 648, 672, 675, 693, 702, 714, 722, 750, 754, 768, 798
Offset: 1

Author

Alexander Kritov, Oct 04 2021

Keywords

Comments

The sequence represents a generalization of cases A033428 (k=1), A347960 (k=2), A347969 (k=5) with all possible k given by A331605. Instead of integer k, it utilizes the ratio B/A.

Examples

			a(6)=42: the quintuple (x,y,z) A,B is 1,2,4 (2,3) because 42 = 2*(1^2 + 2^2 + 4^2) = 3*(1*4 + 1*2 + 2*4).
  a(n)    (x,y,z)     A,  B
    3     (1,1,1)     1,  1
   12     (2,2,2)     1,  1
   18     (1,1,4)     1,  2
   27     (3,3,3)     1,  1
   30     (1,1,2)     5,  6
   42     (1,2,4)     2,  3
   48     (4,4,4)     1,  1
   72     (1,2,2)     8,  9  [also (2,2,8) 1, 2]
   75     (5,5,5)     1,  1
   77     (1,1,3)     7, 11
   98     (1,4,9)     1,  2
  108     (6,6,6)     1,  1
  120     (2,2,4)     5,  6
  147     (7,7,7)     1,  1
  154     (1,2,3)    11, 14
  162     (3,3,12)    1,  2
  168     (2,4,8)     2,  3
  192     (8,8,8)     1,  1
  243     (9,9,9)     1,  1
  255     (1,1,7)     5, 17
  260     (2,5,6)     4,  5
  264     (1,4,4)     8, 11
  270     (2,5,5)     5,  6
  272     (2,2,3)    16, 17
  288     (4,4,2)     8,  9  [also (4,4,16) 1, 2]
		

Crossrefs

The sequence contains A033428 (A=B=1), A347969 (B=2*A), A347960 (B=5*A).

Programs

  • C
    /* See links */
    
  • Python
    from itertools import islice, count
    from math import gcd
    from sympy import divisors, integer_nthroot
    def A348169(): # generator of terms
        for n in count(1):
            for d in divisors(n,generator=False):
                x, x2 = 1, 1
                while 3*x2 <= d:
                    y, y2 = x, x2
                    z2 = d-x2-y2
                    while z2 >= y2:
                        z, w = integer_nthroot(z2,2)
                        if w:
                            A = n//d
                            B, u = divmod(n,x*(y+z)+y*z)
                            if u == 0 and gcd(A,B) == 1:
                                yield n
                                break
                        y += 1
                        y2 += 2*y-1
                        z2 -= 2*y-1
                    else:
                        x += 1
                        x2 += 2*x-1
                        continue
                    break
                else:
                    continue
                break
    A348169_list = list(islice(A348169(),57)) # Chai Wah Wu, Nov 26 2021

A347969 Numbers which are sum of three squares of positive numbers and also 5 times of the sum of their joint products.

Original entry on oeis.org

1715, 6860, 12635, 15435, 27440, 42875, 47915, 50540, 53235, 61740, 84035, 109760, 113715, 138915, 171500, 191660, 202160, 207515, 212940, 218435, 246960, 289835, 302715, 315875, 329315, 336140, 385875, 415835, 431235, 439040, 454860, 479115, 495635, 555660, 582435, 619115, 686000
Offset: 1

Author

Alexander Kritov, Sep 23 2021

Keywords

Comments

The general problem is to find such numbers which can be represented as the sum of three squares of integers x, y, z, and additionally also satisfy: x^2 + y^2 + z^2 = k*(x*y + x*z + y*z).
For k=1 it is simply a(n) = 3*n^2 given by A033428.
For k=2 it is A347360.
The present sequence is for the next k=5.
All possible k-numbers are listed by A331605.

Examples

			    a(n)      ( x,  y,   z)
  ------      -------------
    1715      ( 3,  5,  41)
    6860      ( 6, 10,  82)
   12635      ( 5, 17, 111)
   15435      ( 9, 15, 123)
   27440      (12, 20, 164)
   42875      (15, 25, 205)
   47915      ( 3, 41, 215)
   50540      (10, 34, 222)
   53235      ( 5, 41, 227)
   61740      (18, 30, 246)
   84035      (21, 35, 287)
  109760      (24, 40, 328)
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares, Springer-Verlag, NY, 1985.

Crossrefs

Cf. A000378, A033428, A331605 (all possible k-numbers), A347360.

A347360 Numbers that can be represented as the sum of squares of 3 numbers and also equal to twice the sum of their joint products.

Original entry on oeis.org

18, 72, 98, 162, 288, 338, 392, 450, 648, 722, 882, 1152, 1352, 1458, 1568, 1800, 1922, 2178, 2450, 2592, 2738, 2888, 3042, 3528, 3698, 4050, 4608, 4802, 5202, 5408, 5832, 6272, 6498, 7200, 7442, 7688, 7938, 8450, 8712, 8978, 9522, 9800, 10368, 10658, 10952, 11250, 11552, 11858
Offset: 1

Author

Alexander Kritov, Sep 22 2021

Keywords

Comments

Integers that can be represented as the sum of three squares of integers x, y, z, and additionally also satisfy x^2+y^2+z^2 = k *(x*y+ x*z + y*z), with k=2.
All possible k are given by A331605.

Examples

			For example, the third term (1,4,9) is 1^2+4^2+9^2 = 2*(1*4+1*9+4*9) = 98.
The sequence is given by
   a(n)    (x, y, z)
    18     (1,1,4)
    72     (2,2,8)
    98     (1,4,9)
   162     (3,3,12)
   288     (4,4,16)
   338     (1,9,16)
   392     (2,8,18)
   450     (5,5,20)
   648     (6,6,24)
   722     (4,9,25)
   882     (1,16,25) (3,12,27)  (7,7,28)
  1152     (8,8,32)  (2,18,32)
  1352     (2,18,32)
  1458     (9,9,36)
  1568     (4,16,36)
  1800     (10,10,40)
  1922     (1,25,36)
  2178     (11,11,44)
  2450     (5,20,45)
  2592     (12,12,48)
  2738     (9,16,49)
  2888     (8,18,50)
  3042     (3,27,48) (4,25,49) (13,13,52)
  3528     (2,32,50) (6,24,54)
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares, Springer-Verlag, NY, 1985.

Crossrefs

Subsequence of A000378. Complement of A004215.
Cf. A033428 (case k=1), A324929, A331605 (k-numbers).

Programs

  • Mathematica
    q[n_] := (s = Select[PowersRepresentations[n,3,2], AllTrue[#, #1 > 0 &]&]) != {} && MemberQ[(#[[1]]*#[[2]] + #[[2]]*#[[3]] + #[[3]]*#[[1]])& /@ s, n/2]; Select[Range[2, 12000, 2], q] (* Amiram Eldar, Oct 03 2021 *)

Formula

Empirically, such numbers appear to be a(n) = 2*b_n^2 where b_n are numbers whose product of prime indices is even (A324929).The triplet (x,y,x) is always (n*k^2, n*m^2, n*p^2).