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 101-110 of 237 results. Next

A332987 Sums of two nonzero pentagonal numbers.

Original entry on oeis.org

2, 6, 10, 13, 17, 23, 24, 27, 34, 36, 40, 44, 47, 52, 56, 57, 63, 70, 71, 73, 75, 82, 86, 92, 93, 97, 102, 104, 105, 114, 118, 121, 122, 127, 129, 139, 140, 143, 146, 150, 152, 157, 162, 167, 168, 177, 180, 181, 184, 187, 188, 196, 198, 209, 211, 215, 222, 227
Offset: 1

Views

Author

Olivier Gérard, Mar 05 2020

Keywords

Crossrefs

Cf. A000326 (pentagonal numbers).
Analogs are A000404 (square numbers), A051533 (triangular numbers), A286636 (centered square numbers), A287960 (centered triangular numbers), A288631 (square pyramidal numbers).

Programs

  • Mathematica
    Module[{nn=15,pn},pn=PolygonalNumber[5,Range[nn]];Select[Union[ Total/@ Tuples[ pn,2]],#<=Last[pn]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 15 2021 *)

A354702 T(w,h) is an upper bound for the minimum number of grid points in a square grid covered by an arbitrarily positioned and rotated rectangle of width w and height h, where T(w,h) is a triangle read by rows.

Original entry on oeis.org

0, 1, 2, 2, 4, 7, 2, 5, 9, 12, 3, 7, 13, 17, 21, 4, 8, 15, 20, 26, 32, 4, 9, 18, 22, 31, 36, 40, 5, 11, 20, 27, 36, 44, 49, 57, 6, 12, 24, 30, 41, 48, 54, 66, 72, 7, 14, 26, 35, 46, 55, 63, 74, 84, 96, 7, 15, 28, 37, 50, 60, 67, 81, 90, 105, 112, 8, 16, 31, 40, 55, 64, 72, 88, 96, 112, 120, 128
Offset: 1

Views

Author

Hugo Pfoertner, Jun 15 2022

Keywords

Comments

Grid points must lie strictly within the covering rectangle, i.e., grid points on the perimeter of the rectangle are not allowed.
These upper bounds were determined by an extensive random search, the results of which were stable. The proof that none of these bounds can be improved should be possible with a constructive technique such as integer linear programming applied to all combinatorially possible positions of the rectangle relative to the lattice.
A simple random search is implemented in the attached PARI program, which enables a plausibility check of the results for small covering rectangles. It also provides results for the maximum problem. Additional methods were used to obtain the results shown. In particular, angular orientations of the rectangle along connecting lines between all pairs of lattice points and extreme positions of the rectangle, where lattice points are very close to the corners of the rectangle, were investigated, using adjacent terms in A000404.

Examples

			The triangle begins:
    \ h 1   2   3   4   5   6   7   8   9   10   11   12
   w \ -------------------------------------------------
   1 |  0;  |   |   |   |   |   |   |   |    |    |    |
   2 |  1,  2;  |   |   |   |   |   |   |    |    |    |
   3 |  2,  4,  7;  |   |   |   |   |   |    |    |    |
   4 |  2,  5,  9, 12;  |   |   |   |   |    |    |    |
   5 |  3,  7, 13, 17, 21;  |   |   |   |    |    |    |
   6 |  4,  8, 15, 20, 26, 32;  |   |   |    |    |    |
   7 |  4,  9, 18, 22, 31, 36, 40;  |   |    |    |    |
   8 |  5, 11, 20, 27, 36, 44, 49, 57;  |    |    |    |
   9 |  6, 12, 24, 30, 41, 48, 54, 66, 72;   |    |    |
  10 |  7, 14, 26, 35, 46, 55, 63, 74, 84,  96;   |    |
  11 |  7, 15, 28, 37, 50, 60, 67, 81, 90, 105, 112;   |
  12 |  8, 16, 31, 40, 55, 64, 72, 88, 96, 112, 120, 128
		

Crossrefs

Cf. A293330 (diagonal).
Cf. A291259 (similar problem for circular disks).
Cf. A000404 (used to check extreme positions of grid points).

Programs

  • PARI
    \\ See link.
    
  • PARI
    \\ See also program link in A355241.

A084888 Number of partitions of n^3 into two squares>0.

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 0, 2, 1, 0, 2, 0, 0, 0, 0, 3, 2, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 8, 0, 0, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 8, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 3, 2
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 10 2003

Keywords

Comments

a(A050804(n)) = 1.

Examples

			n=100: 100^3 = 1000000 = 960^2 + 280^2 = 936^2 + 352^2 = 800^2 + 600^2, therefore a(100)=3.
		

Crossrefs

Programs

  • Haskell
    a084888 = a025426 . a000578  -- Reinhard Zumkeller, Jul 18 2012
    
  • PARI
    a(n)=my(f=factor(n^3)); (prod(i=1,#f~,if(f[i,1]%4==1,f[i,2]+1,f[i,2]%2==0||f[i,1]<3))-issquare(n)+1)\2 \\ Charles R Greathouse IV, May 18 2016
    
  • Python
    from math import prod
    from sympy import factorint
    def A084888(n): return ((m:=prod(1 if p==2 else (3*e+1 if p&3==1 else (3*e+1)&1) for p, e in factorint(n).items()))+((((~n**3 & n**3-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1 # Chai Wah Wu, May 17 2023

Formula

a(n) = A025426(A000578(n)).

A134422 Square numbers which are sums of 2 distinct nonzero squares.

Original entry on oeis.org

25, 100, 169, 225, 289, 400, 625, 676, 841, 900, 1156, 1225, 1369, 1521, 1600, 1681, 2025, 2500, 2601, 2704, 2809, 3025, 3364, 3600, 3721, 4225, 4624, 4900, 5329, 5476, 5625, 6084, 6400, 6724, 7225, 7569, 7921, 8100, 8281, 9025, 9409, 10000, 10201
Offset: 1

Views

Author

Artur Jasinski, Oct 25 2007

Keywords

Examples

			25 = 5^2 = 4^2 + 3^2, and so 25 is in the sequence.
100 = 10^2 = 8^2 + 6^2, and so 100 is in the sequence.
169 = 13^2 = 12^2 + 5^2, and so 169 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    c = {}; Do[Do[k = a^2 + b^2; If[IntegerQ[Sqrt[k]], AppendTo[c, k]], {a, 1, b - 1}], {b, 200}]; Union[c] (* Artur Jasinski *)
    Select[Range[100]^2, Length[PowersRepresentations[#, 2, 2]] > 1 &] (* Alonso del Arte, Feb 11 2014 *)
  • PARI
    select(n->for(k=1,sqrtint(n\2),if(issquare(n-k^2), return(n>k^2)));0, vector(100,i,i^2)) \\ Charles R Greathouse IV, Jul 02 2013

Formula

a(n) = A009003(n)^2.

A135791 Positive numbers of the form x^5-10x^3*y^2+5x*y^4 (where x,y are integers and x>y).

Original entry on oeis.org

404, 1900, 3647, 5646, 12928, 13412, 14050, 27688, 30609, 36413, 45716, 51804, 60800, 74576, 90050, 98172
Offset: 1

Views

Author

Artur Jasinski, Nov 29 2007

Keywords

Comments

See A135792, union A135791 and A135792 see A135793. Squares of these numbers are of the form N^5-M^2 (where N belongs to A135787 and M to A057102) Proof uses: (x^5-10x^3 y^2+5xy^4)^2=(x^2+y^2)^5-(5x^4y-10x^2y^3+y^5)^2. [This line needs editing! - N. J. A. Sloane, Dec 04 2007]
Refers to A057102, which had an incorrect description and has been replaced by A256418. As a result the present sequence should be re-checked. - N. J. A. Sloane, Apr 06 2015

Crossrefs

Programs

  • Mathematica
    a = {}; Do[Do[w = x^5 - 10x^3 y^2 + 5x y^4; If[w > 0 && w < 100000, AppendTo[a, w]], {x, y, 1000}], {y, 1, 1000}]; Union[a]

A155707 Numbers expressible as a^2 + k b^2 with nonzero integers a,b, for k=2, k=3, k=5 and k=7.

Original entry on oeis.org

144, 576, 1009, 1129, 1201, 1296, 1801, 1849, 2304, 2521, 2689, 2881, 3049, 3361, 3529, 3600, 3889, 4036, 4201, 4356, 4489, 4516, 4561, 4729, 4804, 5184, 5209, 5569, 5881, 5929, 6841, 7009, 7056, 7204, 7396, 7561, 7681, 8089, 8521, 8689, 8761, 8929
Offset: 1

Views

Author

M. F. Hasler, Feb 10 2009

Keywords

Comments

Subsequence of A155708.

Crossrefs

Programs

  • Maple
    filter:= proc(x) local k,S;
       if numtheory:-quadres(x,3*5*7)<> 1 then return false fi;
       for k in [2,3,5,7] do
         S:= [isolve(x = a^2 + k*b^2)];
         if andmap(t -> subs(t,a*b) = 0, S) then return false fi;
       od;
       true
    end proc;
    select(filter, [$1..10000]); # Robert Israel, May 14 2025
  • PARI
    isA155707(n,/* optional 2nd arg allows us to get other sequences */c=[7, 5, 3, 2]) = { for(i=1, #c, for(b=1, sqrtint((n-1)\c[i]), issquare(n-c[i]*b^2) & next(2)); return); 1}
    for(n=1,9999, isA155707(n) & print1(n","))

A180416 Number of positive integers below 10^n, excluding perfect squares, which have a representation as a sum of 2 positive squares.

Original entry on oeis.org

3, 33, 298, 2649, 23711, 215341, 1982296, 18447847, 173197435, 1637524156, 15570196516, 148735628858, 1426303768587, 13722207893214, 132387231596281, 1280309591127436
Offset: 1

Views

Author

Martin Renner, Jan 19 2011

Keywords

Comments

Numbers that can be represented as a sum of three or more positive squares but not as a sum of two positive squares (e.g., 3=1^2+1^2+1^2 or 6=1^2+1^2+2^2) are not counted. Numbers that can be represented as a sum of two positive squares and alternatively as a sum of three or more positive squares are counted (e.g., 18 = 9+9 = 1+1+16, 26, 41, ...).

Crossrefs

Programs

  • Maple
    isA000415 := proc(n) local x ,y2; if issqr(n) then false; else for x from 1 do y2 := n-x^2 ; if y2 < x^2 then return false; elif issqr(y2) then return true; end if; end do ; end if; end proc:
    A180416 := proc(n) a := 0 ; for k from 2 to 10^n-1 do if isA000415(k) then a := a+1 ; end if; end do: a ; end proc:
    for n from 1 do print(A180416(n)) ; end do; # R. J. Mathar, Jan 20 2011
  • Mathematica
    a[n_] := a[n] = Module[{k, xMax = Floor[Sqrt[10^n - 1]]}, Table[k = x^2 + y^2; If[IntegerQ[Sqrt[k]], Nothing, k], {x, 1, xMax}, {y, x, Floor[ Sqrt[10^n - 1 - x^2]]}] // Flatten // Union // Length];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 8}] (* Jean-François Alcover, Oct 31 2020 *)

Formula

a(n) = |{ 0A000415} }|.
a(n) = |{ 0A000404} \ {A000290}) }|.
a(n) = A002283(n) - A049416(n) - A167615(n) - A180425(n).

Extensions

a(6)-a(8) from Alois P. Heinz, Jan 20 2011
a(9)-a(10) from Donovan Johnson, Feb 04 2011
a(10) corrected and a(11)-a(16) from Hiroaki Yamanouchi, Jul 13 2014

A224770 Numbers that are the primitive sum of two squares in exactly two ways.

Original entry on oeis.org

65, 85, 130, 145, 170, 185, 205, 221, 265, 290, 305, 325, 365, 370, 377, 410, 425, 442, 445, 481, 485, 493, 505, 530, 533, 545, 565, 610, 629, 650, 685, 689, 697, 725, 730, 745, 754, 785, 793, 845, 850, 865, 890, 901, 905, 925, 949, 962, 965, 970
Offset: 1

Views

Author

Wolfdieter Lang, Apr 18 2013

Keywords

Comments

These are the increasingly ordered numbers a(n) which satisfy A193138(a(n)) = 2.
Neither the order of the squares nor the signs of the numbers to be squared are taken into account. The two squares are necessarily distinct and each is nonzero.
This sequence is a proper subsequence of A000404.

Examples

			n=1,   65:  (1, 8),  (4, 7),
n=2,   85:  (2, 9),  (6, 7),
n=3,  130:  (3, 11), (7, 9),
n=4,  145:  (1, 12), (8, 9),
n=5,  170:  (1, 13), (7, 11),
n=6,  185:  (4, 13), (8, 11),
n=7,  205:  (3, 14), (6, 13),
n=8,  221:  (5, 14), (10, 11),
n=9,  265:  (3, 16), (11, 12),
n=10, 290:  (1, 17), (11, 13).
		

Crossrefs

Cf. A224450 (one way), A193138 (multiplicities), A000404, A024509.

Programs

  • Mathematica
    nn = 35; t = Sort[Select[Flatten[Table[If[GCD[a, b] == 1, a^2 + b^2, 0], {a, nn}, {b, a, nn}]], 0 < # <= nn^2 &]]; Transpose[Select[Tally[t], #[[2]] == 2 &]][[1]] (* T. D. Noe, Apr 20 2013 *)

Formula

a(n) = a^2 + b^2, a and integers, 0 < a < b and gcd(a,b) = 1 in exactly two ways. These representations of a(n) are denoted by two different pairs (a,b).

A235141 First differences of A234300.

Original entry on oeis.org

1, 0, 2, -1, 1, 0, 2, -2, 2, -1, 1, 0, 2, -2, 2, -2, 2, 0, 2, -2, 2, -1, 1, -2, 2, -2, 4, -2, 2, -2, 2, -1, 1, -2, 2, 0, 2, -2, 2, -2, 2, -2, 2, -2, 2, 0, 2, -3, 3, -2, 2, -2, 2, -2, 2, -2, 2, 0, 2, -4, 4, -2, 2, -1, 1, -2, 2, -2, 2, -2, 2, 0, 2, -2, 2, -4, 4, -2, 2, -2, 2
Offset: 1

Views

Author

Rajan Murthy, Jan 03 2014

Keywords

Comments

A geometric interpretation of the sequence is the number of added or subtracted squares along the edge of (not completely within) an origin centered circle in a quadrant of a Cartesian grid as the radius increases. The number of squares increase or decrease when the radius squared changes from being exactly on a corner of a square (r^2 = m^2+n^2) to the open interval between corners given by (m^2+n^2,(m+1)^2+(n+1)^2). The square radii that correspond to corners are given by A001481, so each a(n) corresponds to the radius changing from a point to an element of an open set bounded by adjacent elements of A001481.
a(n) is 0 when the radius squared increases from the open interval less than a perfect square to the perfect square itself (corresponding to a radius that intersects the x and y axes at an integer), see below for example.
a(n) is odd when the square radius changes to or from an integer which is twice a square integer (on a corner on the y= x line), see below for example.

Examples

			a(6) = 0 corresponding to a change of square radius from the open interval (3,4) to 4, i.e., the interval (A001481(3),A001481(4)) to A001481(4).
a(48) and a(49) are odd,  corresponding to the transition from (49,50) to 50 and 50 to (50,52) respectively (r = 5).
		

Crossrefs

First differences of A234300.
Cf. A001481 (see comments).
Cf. A232499 (number of completely encircled squares when the radii are indexed by A000404).

Formula

a(n) = A234300(n) - A234300(n-1).

A063664 Numbers whose reciprocal is the sum of two reciprocals of squares.

Original entry on oeis.org

2, 8, 18, 20, 32, 50, 72, 80, 90, 98, 128, 144, 162, 180, 200, 242, 272, 288, 320, 338, 360, 392, 450, 468, 500, 512, 576, 578, 648, 650, 720, 722, 800, 810, 882, 968, 980, 1058, 1088, 1152, 1250, 1280, 1296, 1332, 1352, 1440, 1458, 1568, 1620, 1682, 1800
Offset: 1

Views

Author

Henry Bottomley, Jul 28 2001

Keywords

Comments

These are numbers which can be written either as b^2*c^2*(b^2+c^2)*d^2 or if (b^2+c^2) is a square then as b^2*c^2*d^2, since 1/(b*(b^2+c^2)*d)^2+1/(c*(b^2+c^2)*d)^2 =1/(b^2*c^2*(b^2+c^2)*d^2) and 1/(b*sqrt(b^2+c^2)*d)^2+1/(c*sqrt(b^2+c^2)*d)^2 = 1/(b^2*c^2*d^2).

Examples

			98 is in the sequence since 1/98=1/10^2+1/70^2 (also 1/98=1/14^2+1/14^2).
		

Crossrefs

Either products of terms in A063663 and A000290, or squares of A008594.

Programs

  • Python
    from fractions import Fraction
    def aupto(lim):
      sqr_recips = [Fraction(1, i*i) for i in range(1, lim+2)]
      ssr = set(f + g for i, f in enumerate(sqr_recips) for g in sqr_recips[i:])
      representable = [f.denominator for f in ssr if f.numerator == 1]
      return sorted(r for r in representable if r <= lim)
    print(aupto(1800)) # Michael S. Branicky, Feb 08 2021

Extensions

Offset changed to 1 by Derek Orr, Jun 23 2015
Previous Showing 101-110 of 237 results. Next