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

A025285 Numbers that are the sum of 2 nonzero squares in exactly 2 ways.

Original entry on oeis.org

50, 65, 85, 125, 130, 145, 170, 185, 200, 205, 221, 250, 260, 265, 290, 305, 338, 340, 365, 370, 377, 410, 442, 445, 450, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 578, 580, 585, 610, 625, 629, 680, 685, 689, 697, 730, 740, 745, 754, 765, 785, 793, 800, 820
Offset: 1

Views

Author

Keywords

Comments

Order and signs don't count. E.g. 50 = 5^2+5^2 = 7^2+1^2 (= (-5)^2+5^2, but that doesn't count as different).
A131574 is a subsequence. - Zak Seidov, Jan 31 2014
A025426(a(n)) = 2. - Reinhard Zumkeller, Feb 26 2015

Crossrefs

Programs

  • Haskell
    a025285 n = a025285_list !! (n-1)
    a025285_list = filter ((== 2) . a025426) [1..]
    -- Reinhard Zumkeller, Feb 26 2015
    
  • Mathematica
    selQ[n_] := Length[ Select[ PowersRepresentations[n, 2, 2], Times @@ # != 0 &]] == 2; Select[Range[1000], selQ] (* Jean-François Alcover, Oct 03 2013 *)
  • PARI
    is(n)=sum(k=sqrtint((n-1)\2)+1,sqrtint(n-1), issquare(n-k^2))==2 \\ Charles R Greathouse IV, May 24 2016
    
  • PARI
    is(n)=my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f[, 1], if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); if(t%2, t-(-1)^v, t)==4 \\ Charles R Greathouse IV, May 24 2016

Formula

a(n) >= A007692(n) with equality only for n <= 16. - Alois P. Heinz, Mar 23 2023

A058919 a(n) = n^4/2 - n^3 + 3*n^2/2 - n + 1 = (n^2 + 1)*(n^2 - 2*n + 2)/2.

Original entry on oeis.org

1, 1, 5, 25, 85, 221, 481, 925, 1625, 2665, 4141, 6161, 8845, 12325, 16745, 22261, 29041, 37265, 47125, 58825, 72581, 88621, 107185, 128525, 152905, 180601, 211901, 247105, 286525, 330485, 379321, 433381, 493025, 558625, 630565, 709241, 795061, 888445, 989825, 1099645
Offset: 0

Views

Author

Henry Bottomley, Jan 11 2001

Keywords

Comments

On an n X (n - 1)(n - 2)/2 X n(n - 1)/2 cuboid with n >= 5, the two points at greatest surface distance from a corner are the opposite corner and the point 1 in from each of the two edges on a smallest face which meet at the opposite corner; this greatest surface distance is sqrt(a(n)).
Subsequence of A080827, see formula. - David James Sycamore, Jul 31 2018

Crossrefs

For n >= 4 the sequence is a subsequence of A007692.

Programs

Formula

G.f.: (1 - 4*x + 10*x^2 + 5*x^4)/(1 - x)^5. - Colin Barker, Jan 01 2012
a(n) = A002522(n)*A002522(n-1)/2, with A002522(-1)=2. - Bruno Berselli, Nov 11 2014
a(n) = A080827(n^2-n+1). - David James Sycamore, Jul 31 2018
E.g.f.: exp(x)*(2 + 4*x^2 + 4*x^3 + x^4)/2. - Stefano Spezia, Oct 08 2022
For n>1, a(n) = A000217(n-1)^2 + (A000217(n-1)+1)^2 = (A000217(n)-1)^2 + (A000217(n-2)-1)^2. - Charlie Marion, Feb 08 2024

A025294 Numbers that are the sum of 2 nonzero squares in 3 or more ways.

Original entry on oeis.org

325, 425, 650, 725, 845, 850, 925, 1025, 1105, 1250, 1300, 1325, 1445, 1450, 1525, 1625, 1690, 1700, 1825, 1850, 1885, 2050, 2125, 2210, 2225, 2405, 2425, 2465, 2525, 2600, 2650, 2665, 2725, 2825, 2873, 2890, 2900, 2925, 3050, 3125, 3145, 3250, 3380
Offset: 1

Views

Author

Keywords

Comments

A025426(a(n)) > 2. - Reinhard Zumkeller, Feb 26 2015

Crossrefs

Complement of A025285 relative to A007692. - Washington Bomfim, Oct 24 2010
Cf. A025426.

Programs

  • Haskell
    a025294 n = a025294_list !! (n-1)
    a025294_list = filter ((> 2) . a025426) [1..]
    -- Reinhard Zumkeller, Feb 26 2015
  • Maple
      N:= 100000: # generate all entries <=N
    SSQ:= {}: SSQ2:= {}: SSQ3:= {}:
    for a from 1 to floor(sqrt(N)) do
      for b from a to floor(sqrt(N-a^2)) do
        n:= a^2 + b^2;
        if member(n,SSQ2) then SSQ3:= SSQ3 union {n}
        elif member(n,SSQ) then SSQ2:= SSQ2 union {n}
        else SSQ:= SSQ union {n}
        end if
    end do end do:
    SSQ3;  # Robert Israel, Jan 20 2013
  • Mathematica
    okQ[n_] := Length[Select[PowersRepresentations[n, 2, 2][[All, 1]], Positive] ] > 2; Select[Range[5000], okQ] (* Jean-François Alcover, Mar 04 2019 *)

A272701 Taxi-cab numbers (A001235) that are the sum of two nonzero squares in more than one way.

Original entry on oeis.org

4624776, 15438250, 27445392, 36998208, 123506000, 127396178, 216226981, 219563136, 238328064, 269442621, 295985664, 310289733, 406767816, 423432360, 449519625, 510200217, 578097000, 590421637, 632767581, 634207392, 715674609, 751462677
Offset: 1

Views

Author

Altug Alkan, May 12 2016

Keywords

Comments

Motivation was that question: What are the numbers that are the sums of 2 positive cubes in more than 1 way and also sums of 2 positive squares in more than 1 way?
A001235(99) = 4624776 = 2^3*3^6*13*61 is the least number with this property.
A taxi-cab number (A001235) can be the sum of two nonzero squares in exactly one way. For example 22754277 is the least taxi-cab number that is the sum of two nonzero squares in exactly one way. 22754277 = 69^3 + 282^3 = 189^3 + 252^3 = 2646^2 + 3969^2. So 22754277 is not a member of this sequence. The next one is 8*22754277 = 182034216 = 138^3 + 564^3 = 378^3 + 504^3 = 2646^2 + 13230^2.
A taxi-cab number (A001235) can be of the form 2*n^2. For example 760032072 is the least number with this property. 760032072 = 114^3 + 912^3 = 513^3 + 855^3 = 2*19494^2. Note that 760032072 is a term of A081324. So it is not a term of this sequence.
216226981 = 373*661*877 is the first term that has three prime divisors. It is also first squarefree term in this sequence.
It is easy to see that this sequence is infinite.

Examples

			4624776 = 51^3 + 165^3 = 72^3 + 162^3 = 1026^2 + 1890^2 = 1350^2 + 1674^2.
27445392 = 141^3 + 291^3 = 198^3 + 270^3 = 756^2 + 5184^2 = 1296^2 + 5076^2.
36998208 = 102^3 + 330^3 = 144^3 + 324^3 = 648^2 + 6048^2 = 1728^2 + 5832^2.
		

Crossrefs

Programs

  • PARI
    T = thueinit(x^3+1, 1);
    isA001235(n) = {my(v=thue(T, n)); sum(i=1, #v, v[i][1]>=0 && v[i][2]>=v[i][1])>1;}
    isA007692(n) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++);); nb >= 2;}
    isok(n) = isA001235(n) && isA007692(n);

A274044 Squarefree numbers that are the sum of two squares in more than one way.

Original entry on oeis.org

65, 85, 130, 145, 170, 185, 205, 221, 265, 290, 305, 365, 370, 377, 410, 442, 445, 481, 485, 493, 505, 530, 533, 545, 565, 610, 629, 685, 689, 697, 730, 745, 754, 785, 793, 865, 890, 901, 905, 949, 962, 965, 970, 985, 986, 1010, 1037, 1066, 1073, 1090, 1105, 1130, 1145
Offset: 1

Views

Author

Altug Alkan, Jun 07 2016

Keywords

Comments

Squarefree numbers that are the sum of two nonzero squares in more than one way.

Examples

			65 is a term because 65 = 5*13 = 1^2 + 8^2 = 4^2 + 7^2.
		

Crossrefs

Programs

  • PARI
    isA007692(n) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb >= 2; }
    lista(nn) = for(n=1, nn, if(isA007692(n) && issquarefree(n), print1(n, ", ")));

Formula

A005117 INTERSECT A007692. - R. J. Mathar, Feb 01 2017

A058920 a(n) = 2*n^4 + 2*n^3 + 3*n^2 + 2*n + 1.

Original entry on oeis.org

1, 10, 65, 250, 697, 1586, 3145, 5650, 9425, 14842, 22321, 32330, 45385, 62050, 82937, 108706, 140065, 177770, 222625, 275482, 337241, 408850, 491305, 585650, 692977, 814426, 951185, 1104490, 1275625, 1465922, 1676761, 1909570, 2165825
Offset: 0

Views

Author

Henry Bottomley, Jan 11 2001

Keywords

Comments

On a 2n X (n^2 - n + 1) X n^2 cuboid (with n >= 3) there are six pairs of points with the maximum surface distance between them: the four pairs of opposite corners and the opposite pairs of points on the smallest faces 1 in from the midpoints of the shortest edges; this maximum surface distance is sqrt(a(n)).

Crossrefs

For n >= 2 the sequence is a subsequence of A007692.

Programs

  • Mathematica
    Table[2n^4+2n^3+3n^2+2n+1,{n,0,40}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{1,10,65,250,697},40] (* Harvey P. Dale, Dec 17 2017 *)
  • PARI
    a(n) = 2*n^4 + 2*n^3 + 3*n^2 + 2*n + 1 \\ Harry J. Smith, Jun 24 2009

Formula

G.f.: (1+5*x+25*x^2+15*x^3+2*x^4)/(1-5*x+10*x^2-10*x^3+5*x^4-x^5). - Colin Barker, Jan 01 2012

A333443 Numbers k such that both k and k+1 are sums of two positive squares in 2 or more ways.

Original entry on oeis.org

985, 1585, 1768, 1780, 2249, 2329, 2500, 2929, 3280, 3649, 3977, 4264, 4329, 4705, 4849, 5017, 5044, 5065, 5140, 5161, 5512, 5617, 5625, 6340, 6409, 6697, 7240, 7684, 7785, 7956, 7969, 8020, 8065, 8320, 8584, 8905, 9089, 9265, 9529, 9553, 9593, 9700, 9809
Offset: 1

Views

Author

Mateusz Winiarski, Mar 21 2020

Keywords

Comments

Numbers k such that both k and k+1 belong to A007692.

Examples

			985 is a term since 12^2 + 29^2 = 16^2 + 27^2 = 985 and 5^2 + 31^2 = 19^2 + 25^2 = 986.
625 is not a term because 626 cannot be written as the sum of two positive squares in more than one way.
		

Crossrefs

Subsequence of A007692.

Programs

  • Mathematica
    ok[n_] := Length@ IntegerPartitions[n, {2}, Range[Sqrt@ n]^2] >= 2; Select[ Range@ 10000, ok[#] && ok[#+1] &] (* Giovanni Resta, Mar 24 2020 *)
  • Python
    n=100
    t=[]
    prev=0
    A333443=[]
    for i in range(1,n+1):
        t.append(i*i)
    for j in range(n**2):
        n=0
        for k in t[:j+1]:
            if j-k in t and k<=j-k:
                n=n+1
                if n>1:
                    if j-prev==1:
                        A333443.append(j-1)
                    prev=j

A273508 Values of A272701 that are the sum of a positive square and a positive cube in more than one way.

Original entry on oeis.org

36998208, 449519625, 2367885312, 8016025680, 9563569561, 14753560033, 26971693632, 28769256000, 61358997609, 151544659968, 225128651328, 278450575201, 282429583137, 310289733000, 310289733000, 327699806625, 498700534033, 513025643520, 578097000000
Offset: 1

Views

Author

Altug Alkan, May 23 2016

Keywords

Comments

Taxi-cab numbers (A001235) that are the sum of two nonzero squares in more than one way and also the sum of a positive square and a positive cube in more than one way.
Subsequence of A273498.
A001235(293) = 6^3*A001235(16) = 6^3*171288 = 36998208 is the least number with this property.
14753560033 = 1453*2677*3793 is the first term that is in A272935.
Obviously, in this sequence there are perfect powers infinitely many times.

Examples

			36998208 is a term because 36998208 = 102^3 + 330^3 = 144^3 + 324^3 = 1728^2 + 324^3 = 5832^2 + 144^3 = 648^2 + 6048^2 = 1728^2 + 5832^2.
		

Crossrefs

Extensions

a(2)-a(19) from Giovanni Resta, May 24 2016

A360796 a(n) > n is the smallest integer such that there exist integers n < c <= d < a(n) satisfying n^2 + a(n)^2 = c^2 + d^2.

Original entry on oeis.org

7, 9, 11, 13, 14, 17, 17, 19, 20, 25, 23, 29, 26, 27, 29, 37, 31, 40, 34, 35, 38, 46, 39, 41, 44, 43, 44, 54, 47, 58, 49, 51, 56, 53, 54, 67, 62, 59, 59, 70, 62, 73, 64, 65, 74, 78, 69, 71, 71, 75, 74, 86, 76, 77, 79, 83, 92, 93, 83, 103
Offset: 1

Views

Author

Giedrius Alkauskas, Feb 21 2023

Keywords

Comments

n^2 + a(n)^2 belongs to A007692.
The identity n^2 + (2*n + 5)^2 = (n+4)^2 + (2*n + 3)^2 shows that a(n) <= 2*n + 5. The last case when the equality holds is n = 16.
a(n) = a(n+1) has infinitely many solutions. This holds, in particular, when n = (u*v + u + v - 1) * (u*v - 2)/2 - 1 for positive integers u, v satisfying v+2 <= u <= 6*v - 3.
a(n-1) = a(n) = a(n+1) holds for n = (3*v^2 + 5*v + 1) * (6*v^2 + 3*v - 2), v >= 3.

Examples

			a(10) = 25, since 10^2 + 25^2 = 14^2 + 23^2, and no integers b, c, d exist satisfying 10 < c <= d < b < 25 and 10^2 + b^2 = c^2 + d^2.
		

Crossrefs

Programs

  • Maple
    a :=proc(n::integer) local found::boolean; local N, SQ, i;
    found:=false; N:=n+1; SQ:={};
    while not found do SQ:=SQ union {N^2}; N:=N+1;
    for i from n+1 to N-1 do
    if evalb(N^2+n^2-i^2 in SQ) then found:=true; end if;
    end do; end do; N end proc;

A369498 Integers k such that k = a^2 + b^2 = c^2 + d^2 and a + b = 3(c - d), where a, b, c and d are distinct positive integers.

Original entry on oeis.org

65, 260, 585, 650, 1037, 1040, 1625, 1853, 2340, 2378, 2465, 2600, 3185, 3650, 4148, 4160, 5265, 5513, 5850, 6500, 6890, 7298, 7412, 7865, 8177, 9333, 9360, 9512, 9593, 9860, 10400, 10985, 12740, 14600, 14625, 14690, 16133, 16250, 16592, 16640, 16677, 18005
Offset: 1

Views

Author

Gonzalo Martínez, Jan 24 2024

Keywords

Comments

These numbers allow the generation of infinitely many arithmetic progressions (A.P.) of length 4 whose elements belong to A000404.
For example, (37, 61, 85, 109) is an A.P. whose difference is 24, and 37, 61, 85 and 109 are in A000404.
To prove that in A000404 there exist infinitely many 4-tuples (x,y,z,w) that form an A.P. we can find a 4-tuple as a function of a parameter m. For this purpose, we consider the following expressions:
x = (m - a)^2 + (m - b)^2 = 2m^2 - 2m(a + b) + a^2 + b^2
y = (m - c)^2 + (m + d)^2 = 2m^2 - 2m(c - d) + c^2 + d^2
z = (m + c)^2 + (m - d)^2 = 2m^2 + 2m(c - d) + c^2 + d^2
w = (m + a)^2 + (m + b)^2 = 2m^2 + 2m(a + b) + a^2 + b^2
where a, b, c, d are distinct integers such that a^2 + b^2 = c^2 + d^2. Therefore, x, y, z, w will be in A.P. if x + z = 2y, whence we conclude that a + b = 3(c-d).
Thus, if k = a^2 + b^2 = c^2 + d^2 and a + b = 3(c - d), where a, b, c and d are distinct positive integers, then (x, y, z, w) form an A.P. for all positive integers m, and if m > min{a,b,c,d} then all elements belong to A000404.
The smallest number with this property is 65, since 65 = 8^2 + 1^2 = 7^2 + 4^2 and 8 + 1 = 3*(7 - 4). Taking k = 65 and m = 2, the tuple (37, 61, 85, 109) results.

Examples

			1037 is a term because 1037 = 26^2 + 19^2 = 29^2 + 14^2 and 26 + 19 = 3*(29 - 14).
		

Crossrefs

Programs

  • Python
    from math import isqrt
    def A369498_list(n):
        return sorted([
            a**2 + b**2
            for a in range(1, isqrt(n) + 1)
            for b in range(1, a)
            for c in range(1, isqrt(n) + 1)
            for d in range(1, c)
            if a != c and a != d
            and a**2 + b**2 == c**2 + d**2
            and a + b == 3 * (c - d)
            and a**2 + b**2 <= n
        ])
    print(A369498_list(18500))
Previous Showing 11-20 of 20 results.