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-50 of 54 results. Next

A159935 Least integer such that a(n)^2 - n is the sum of two nonzero squares.

Original entry on oeis.org

5, 3, 2, 4, 3, 5, 4, 3, 4, 7, 6, 4, 5, 9, 4, 5, 6, 5, 6, 6, 5, 11, 12, 5, 7, 15, 6, 8, 6, 7, 8, 6, 7, 13, 6, 8, 7, 21, 8, 7, 9, 7, 10, 12, 7, 15, 8, 7, 10, 9, 10, 8, 9, 11, 8, 9, 8, 17, 30, 8, 10, 9, 8, 9, 9, 13, 10, 18, 9, 11, 12, 9, 12, 9, 10, 10, 9, 15, 16, 9, 10, 11, 10, 10, 11, 21, 12, 10, 15
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • PARI
    issum2sq(n) = local(fm, hf); hf=0;fm=factor(n);for(i=1,matsize(fm)[1],if(fm[i,1]==2,if(fm[i,2]%2,hf=1),if(fm[i,1]%4==1,hf=1,if(fm[i, 2]%2,return(0)))));hf
    minsum2sq(n) = local(k); k=1;while(!issum2sq(k^2-n),k++);k
    /* Note: the issum2sq function depends on PARI returning -1 as a factor for negative n. */

A164622 Primes p such that p*floor(p/2) - 4 and p*floor(p/2) + 4 are prime numbers.

Original entry on oeis.org

151, 463, 571, 631, 643, 991, 1063, 1171, 1831, 2083, 2311, 4951, 5023, 6211, 6703, 6763, 7723, 7951, 9043, 11383, 12163, 12391, 13183, 14851, 15031, 17431, 19231, 19543, 20143, 22051, 23143, 25951, 26371, 27283, 28351, 29131, 30643, 32803
Offset: 1

Views

Author

Keywords

Comments

151*75-4=11321 (prime), 151*75+4=11329 (prime), ..

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[p*Floor[p/2]-4]&&PrimeQ[p*Floor[p/2]+4],AppendTo[lst,p]],{n,8!}];lst

Extensions

Edited by Charles R Greathouse IV, Nov 02 2009

A164623 Primes p such that p*(p-1)/2-5 and p*(p-1)/2+5 are also prime numbers.

Original entry on oeis.org

13, 157, 673, 1069, 1117, 1153, 1213, 1597, 2029, 2089, 2437, 2713, 2833, 3613, 4057, 4909, 5653, 6337, 6529, 7549, 7993, 8053, 9613, 10789, 11497, 11689, 12073, 12373, 13309, 13669, 13789, 14173, 15289, 15937, 16249, 18097, 18637, 19249, 19993
Offset: 1

Views

Author

Keywords

Comments

Primes A000040(k) such that A008837(k)+-5 are also prime numbers.

Examples

			13 is in the sequence because 13*6-5=73 and 13*6+5=83 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[2300]], PrimeQ[# (# - 1)/2 - 5] && PrimeQ[# (# - 1)/2 + 5] &]
  • PARI
    forprime(p=2,10^6,my(b=binomial(p,2));if(isprime(b-5)&isprime(b+5),print1(p,", "))); /* Joerg Arndt, Apr 10 2013 */

Extensions

Edited by R. J. Mathar, Aug 20 2009
Mathematica code adapted to the definition by Bruno Berselli, Apr 10 2013

A174825 Prime concatenations p = concatenation of c, b, and a where a, b, c is a primitive Pythagorean triple, a < b < c.

Original entry on oeis.org

25247, 18517657, 42541687, 48148031, 305224207, 461380261, 929920129, 1249960799, 4141414091, 13811020931, 17451736177, 18011680649, 19011820549, 22852204603, 25812460781, 27492580949, 39653956267, 47094700291
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Mar 30 2010

Keywords

Comments

c^2 = b^2 + a^2 with c > b > a relatively prime, i.e. a primitive Pythagorean triple
Note two curiosities for 6th term p(6) = cat(461, 280, 261) = prime(24423734):
cat(261, 380, 461): 261380461 = prime(14267135) also prime, SMALLEST of this type
Additionally p(6) is also the FIRST such concatenation with a prime hypotenuse: 461 = prime(89) Same is true for p(8) = 1249960799 = prime(62841771), 7999601249 = prime(367766086), 1249 = prime(204)
p(15) = 25812460781 = prime(1125896092), 78124602581 = prime(3250321954)
but hypotenuse 2581 = 29 * 89 and short leg 781 = 11 * 71 are both composite
p(18) = 47094700291= prime(2001581081), 29147004709 = prime(1264629019), 4709 = 17 * 277, 291 = 3 * 97

Examples

			25^2 = 24^2 + 7^2, and cat(25, 24, 7) = 25247 is prime, so 25247 is in the sequence.
5^2 = 4^2 + 3^2, but cat(5, 4, 3) = 543 = 3*181 is not prime, so 543 is not in the sequence.
		

References

  • W. W. R. Ball, H. S. M. Coxeter: Mathematical Recreations and Essays, New York: Dover, 1987
  • L. E. Dickson: "Rational Right Triangles", ch. 4 in History of the Theory of numbers, vol. II, Dover Publications 2005
  • W. Sierpinski: Pythagorean Triangles, Mineola, NY, Dover Publications, Inc, 2003

Crossrefs

Extensions

Edited by Franklin T. Adams-Watters, Aug 27 2012

A211176 Numbers n which are the hypotenuse of a Pythagorean triple with n' as a leg, where n' is the arithmetic derivative of n.

Original entry on oeis.org

125, 625, 23125, 142805, 210125, 371293, 7983625, 9370805, 25757525, 50062025, 120670225, 489766225, 881052625, 1471596725, 2307267625, 2489771125, 3145529225, 3474871553, 6975757441, 7977558641
Offset: 1

Views

Author

Paolo P. Lava, Feb 01 2013

Keywords

Comments

This sequence is a subsequence of A008846. - Ray Chandler, Jan 27 2017

Examples

			n = 23125, n' = 19125 and sqrt(n^2-n'^2) = 13000.
		

Crossrefs

Programs

  • Maple
    with(numtheory); ListA211176:= proc(q)local a,n,p;
    for n from 2 to q do a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]);
    if n<>a and type(sqrt(n^2-a^2),integer) then print(n); fi;
    od; end: ListA211176(10^9);

Formula

A002144(n)^A002365(n) and A002144(n)^A002366(n) are terms of the sequence for all n. - Ray Chandler, Jan 27 2017

Extensions

Name and Maple program corrected by Paolo P. Lava, Sep 30 2013
a(12)-a(16) from Donovan Johnson, Sep 30 2013
a(17)-a(18) from Ray Chandler, Jan 25 2017
a(19)-a(20) from Ray Chandler, Jan 27 2017

A277534 Least hypotenuse, c, of a Primitive Pythagorean Triangle (PPT) such that the difference between it, c, and its greater leg, b, is n; or 0 if no such PPT exists.

Original entry on oeis.org

5, 17, 0, 0, 65, 0, 0, 29, 65, 185, 0, 0, 169, 0, 0, 0, 221, 333, 0, 0, 273, 0, 0, 0, 157, 481, 0, 0, 1189, 0, 0, 641, 1353, 629, 0, 0, 1517, 0, 0, 425, 1681, 777, 0, 0, 1845, 0, 0, 0, 205, 925, 0, 0, 2173, 0, 0, 0, 2337, 1073, 0, 0, 2501, 0, 0, 0, 2665, 1221, 0, 0, 2829, 0, 0, 1405, 2993, 1369, 0
Offset: 1

Views

Author

Ron Knott and Robert G. Wilson v, Jun 05 2014

Keywords

Comments

n = 1, 2, 5, 8, 9, 10, 13, 17, 18, 21, 25, ..., satisfies the first criterion;
a(n) = 0 for n = 3, 4, 6, 7, 11, 12, 14, 15, 16, 19, 20, 22, 23, 24, ..., ;
a(n) = 0 for 5832 of the first 10000 terms;
a(8n) = 0 for 832 of the first 10000 terms;
a(8n) = 0 for n: 2, 3, 6, 7, 8, 10, 11, 12, 14, 15, 18, 19, 22, 23, 24, ..., ;
a(8n+1) > 0;
a(8n+2) > 0; a linear 2nd-order recurrence: a(n) = 2*a(n-1) - a(n-2) with a(1) = 185 & a(2) = 333;
a(8n+3) = 0;
a(8n+4) = 0;
a(8n+5) > 0;
a(8n+6) = 0;
a(8n+7) = 0;
Prime terms: 5, 17, 29, 157, 641, 3821, 4201, 17749, 21601, 31981, 38273, 44789, 61129, 66173, 72161, 100673, 108541, 114553, 121421, 142973, 165541, 173777, 182141, 204733, 213881, 225889, 235493, 281837, ..., .

Examples

			a(1) is 5 since the PPT (3,4,5) satisfies the first stated criterion; a(2) is 17 since the PPT (8,15,17) satisfies the first stated criterion; a(3) = 0 since there exists no PPT that satisfies the stated criteria; etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := FindInstance[ a^2 + b^2 == c^2 && Mod[c, 4] == 1 && 0 < a < b < c && c - b == n, {a, b, c}, Integers][[1, 3, 2, 1, 1, 3]] + 1 /. 1 + {}[[1, 3, 2, 1, 1, 3]] -> 0; f[1] = 5; Array[f, 75]

A282095 Larger member of a coprime pair (x,y) which solves x^2 + y^2 = z^3 with positive x, y and z.

Original entry on oeis.org

11, 46, 52, 117, 142, 198, 236, 286, 415, 488, 524, 549, 621, 666, 835, 873, 908, 970, 1001, 1199, 1388, 1432, 1692, 1757, 1962, 1964, 1971, 2035, 2041, 2366, 2392, 2630, 2655, 2681, 2702, 2815, 2826, 3195, 3421, 3544, 3664, 3715, 4048, 4070, 4097, 4356
Offset: 1

Views

Author

R. J. Mathar, Feb 06 2017

Keywords

Comments

If x and y are coprime, so obviously are also (x,z) and (y,z).
The ordered values of the bases of the cubes, z, are a subsequence of (and conjecturally the same as) A008846.
For production purposes we advice to use the parametrized representations (see references).

Examples

			2^2 + 11^2 = 5^3, so 11 is in the sequence.
9^2 + 46^2 = 13^3, so 46 is in the sequence.
47^2 + 52^2 = 17^3, so 52 is in the sequence.
44^2 + 117^2 = 25^2, so 117 is in the sequence.
		

Crossrefs

Subsequence of A282093. Cf. A099533.

Programs

  • Maple
    # slow version for demonstration only.
    isA282095 := proc(y)
        local x,z3 ;
        for x from 1 to y do
            if igcd(x,y) = 1 then
                z3 := x^2+y^2 ;
                if isA000578(z3) then
                    return true ;
                end if;
            end if;
        end do:
        return false ;
    end proc:
    for y from 1 do
        if isA282095(y) then
            printf("%d,\n",y) ;
        end if;
    end do:
  • Mathematica
    okQ[y_] := Module[{x, z3}, For[x=1, xJean-François Alcover, Dec 04 2017, after R. J. Mathar *)

Formula

{y: x^2 + y^2 = z^3; gcd(x,y) = 1; 1 <= x <= y; x, y, z in N}

A328499 The number of primitive Pythagorean triangles with perimeter less than n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 1

Views

Author

Mo Li, Oct 17 2019

Keywords

Comments

D. N. Lehmer has proved that the asymptotic density of a(n) is a(n)/n = log(2)/Pi^2 = 0.07023049... See A118858.

Examples

			For n=90, the triples are
   {3,  4,  5},  3 +  4 +  5 = 12 < 90
   {5, 12, 13},  5 + 12 + 13 = 30 < 90
   {7, 24, 25},  7 + 24 + 25 = 56 < 90
   {8, 15, 17},  8 + 15 + 17 = 40 < 90
   {9, 40, 41},  9 + 40 + 41 = 90
  {12, 35, 37}, 12 + 35 + 37 = 84 < 90
  {20, 21, 29}, 20 + 21 + 29 = 70 < 90
so a(90)=7.
		

Crossrefs

A375463 Numbers appearing on all three positions in ordered primitive Pythagorean triples.

Original entry on oeis.org

221, 325, 377, 425, 493, 629, 697, 725, 925, 1025, 1073, 1189, 1325, 1517, 1537, 1769, 1885, 1961, 2173, 2257, 2405, 2501, 2665, 2701, 2993, 3145, 3233, 3293, 3445, 3485, 3649, 3869, 3965, 3977, 4453, 4505, 4717, 4745, 5141, 5185, 5353, 5429, 5777, 5785, 5917
Offset: 1

Views

Author

Piotr Lipski, Aug 16 2024

Keywords

Examples

			221 is a term since the following primitive Pythagorean triples have 221 in first, second and third position: (221, 24420, 24421), (60, 221, 229), (21, 220, 221).
		

Crossrefs

Intersection of A008846, A024352 and A024354.
Cf. A263728.

Programs

  • PARI
    \\ See Links section.

Formula

a(n) == 1 (mod 4). - Hugo Pfoertner, Aug 18 2024

Extensions

More terms from Rémy Sigrist, Aug 17 2024

A157075 Positive integers n for which the Diophantine equation x^2 + y^2 = n^2/2 has relatively prime solutions.

Original entry on oeis.org

10, 26, 34, 50, 58, 74, 82, 106, 122, 130, 146, 170, 178, 194, 202, 218, 226, 250, 274, 290, 298, 314, 338, 346, 362, 370, 386, 394, 410, 442, 458, 466, 482, 514, 530, 538, 554, 562, 578, 586, 610, 626, 634, 650, 674, 698, 706, 730, 746, 754, 778, 794, 802
Offset: 1

Views

Author

Knut Angstrom (angstrom.knut(AT)telia.com), Feb 22 2009

Keywords

Formula

a(n) = 2 * A008846(n). [From N. J. A. Sloane, Feb 24 2009]

Extensions

Edited and extended by Max Alekseyev, Apr 22 2010
Previous Showing 41-50 of 54 results. Next