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.

Showing 1-9 of 9 results.

A082075 First differences of primes of the form 4*k+3 (A002145).

Original entry on oeis.org

4, 4, 8, 4, 8, 12, 4, 12, 8, 4, 8, 4, 20, 4, 20, 4, 8, 12, 12, 4, 12, 12, 8, 12, 12, 4, 12, 12, 12, 8, 12, 24, 4, 20, 16, 12, 8, 12, 4, 36, 12, 8, 4, 20, 4, 12, 8, 4, 8, 4, 20, 24, 16, 8, 16, 12, 8, 12, 12, 12, 4, 12, 24, 8, 28, 8, 12, 4, 8, 36, 24, 12, 4, 12, 20, 4, 20, 4, 20, 4, 8, 28, 20, 4
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Examples

			The first and second primes of the form 4*k+3 are 3 and 7, so a(1) = 7-3 = 4.
		

Crossrefs

Programs

  • Mathematica
    k=0; m=4; r=3; Do[s=Mod[Prime[n], m]; If[Equal[s, r], rp=ep; k=k+1; ep=Prime[n]; Print[ep-rp]; ], {n, 1, 1000}]

Formula

a(n) = A002145(n+1) - A002145(n).

A082074 One quarter of first differences of primes of the form 4*k+1 (A002144).

Original entry on oeis.org

2, 1, 3, 2, 1, 3, 2, 3, 4, 2, 1, 2, 1, 6, 3, 2, 4, 2, 3, 1, 8, 1, 2, 4, 3, 2, 1, 3, 5, 1, 5, 3, 1, 5, 4, 2, 1, 2, 3, 3, 4, 2, 1, 12, 3, 5, 4, 3, 2, 4, 2, 3, 1, 6, 3, 2, 3, 1, 6, 2, 6, 6, 1, 2, 1, 6, 3, 3, 2, 6, 1, 5, 1, 12, 2, 1, 3, 6, 5, 3, 1, 2, 3, 4, 3, 2, 6, 1, 3, 2, 3, 6, 7, 3, 2, 3, 1, 3, 2, 3, 7, 3, 2, 1, 5
Offset: 1

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Examples

			The first and second primes of the form 4*k+1 are 5 and 13, so a(1) = (13-5)/4 = 2.
		

Crossrefs

Programs

  • Mathematica
    k=0; m=4; r=1; Do[s=Mod[Prime[n], m]; If[Equal[s, r], rp=ep; k=k+1; ep=Prime[n]; Print[(ep-rp)/4]; ], {n, 1, 1000}]
    Differences[Select[4*Range[1000]+1,PrimeQ]]/4 (* Harvey P. Dale, Dec 04 2011 *)

Formula

a(n) = (A002144(n+1) - A002144(n))/4.

A082076 First differences of primes of the form 4*k+3 (A002145), divided by 4.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Apr 07 2003

Keywords

Examples

			The first and second primes of the form 4*k+3 are 3 and 7, so a(1) = (7-3)/4 = 1.
		

Crossrefs

Programs

  • Mathematica
    k=0; m=4; r=3; Do[s=Mod[Prime[n], m]; If[Equal[s, r], rp=ep; k=k+1; ep=Prime[n]; Print[(ep-rp)/4]; ], {n, 1, 1000}]
    Differences[Select[Prime[Range[400]],IntegerQ[(#-3)/4]&]]/4 (* Harvey P. Dale, Apr 29 2022 *)

Formula

a(n) = (A002145(n+1) - A002145(n))/4.

A082098 a(n) is the smallest prime p of the form 4k+3 such that nextprime(p) - p = 4n.

Original entry on oeis.org

7, 359, 199, 1831, 887, 2179, 2971, 5591, 9551, 33247, 15683, 106543, 25471, 153191, 43331, 288583, 372539, 360091, 873787, 542603, 637939, 544279, 1291691, 860143, 1313467, 1388483, 2238823, 2637799, 6695747, 1895359, 6752623, 3851459
Offset: 1

Views

Author

Labos Elemer, Apr 14 2003

Keywords

Examples

			a(9) = 9551 since nextprime(9551) - 9551 = 9587 - 9551 = 36 = 4 * 9.
		

Crossrefs

Programs

  • Mathematica
    {m=4, r=3}; f[x_] := (Prime[x+1]-Prime[x])/m t=Table[0, {100}]; Do[s=f[n]; s1=Mod[Prime[n+1], m]; If[IntegerQ[s]&&Equal[s1, r]&&s<101&&t[[s]]==0, t[[s]]=Prime[n]], {n, 1, 1000000}]; t
  • PARI
    list(len) = {my(v = vector(len), c = 0, p1 = 2, r1 = p1 % 4, r2, i); forprime(p2 = 3, , r2 = p2 % 4; if(r1 == 3 && r2 == 3, i = (p2 - p1) / 4; if(i <= len && v[i] == 0, c++; v[i] = p1; if(c == len, break))); p1 = p2; r1 = r2); v;} \\ Amiram Eldar, Feb 11 2025

A082099 a(n) is the smallest prime p of the form 4k+1 such that nextprime(p) - p = 4n.

Original entry on oeis.org

13, 89, 509, 1933, 1637, 1669, 5953, 27701, 12853, 19333, 36389, 28229, 19609, 82073, 102701, 89689, 134513, 31397, 212701, 815729, 461717, 1155733, 927869, 360653, 396733, 3422813, 3279841, 370261, 5845193, 6085441, 6808273, 9810653
Offset: 1

Views

Author

Labos Elemer, Apr 14 2003

Keywords

Examples

			a(9) = 12853 since nextprime(12853) - 12853 = 12889 - 12853 = 36 = 4 * 9.
		

Crossrefs

Programs

  • Mathematica
    {m=4, r=1}; f[x_] := (Prime[x+1]-Prime[x])/m t=Table[0, {100}]; Do[s=f[n]; s1=Mod[Prime[n+1], m]; If[IntegerQ[s]&&Equal[s1, r]&&s<101&&t[[s]]==0, t[[s]]=Prime[n]], {n, 1, 1000000}]; t
  • PARI
    list(len) = {my(v = vector(len), c = 0, p1 = 2, r1 = p1 % 4, r2, i); forprime(p2 = 3, , r2 = p2 % 4; if(r1 == 1 && r2 == 1, i = (p2 - p1) / 4; if(i <= len && v[i] == 0, c++; v[i] = p1; if(c == len, break))); p1 = p2; r1 = r2); v;} \\ Amiram Eldar, Feb 11 2025

A217503 Squared distance between consecutive primes of the form 4k+1 (see below).

Original entry on oeis.org

1, 2, 2, 2, 2, 10, 8, 10, 8, 4, 2, 10, 4, 20, 18, 10, 2, 20, 58, 8, 40, 2, 40, 20, 10, 90, 2, 20, 10, 116, 2, 8, 20, 10, 2, 10, 20, 26, 4, 146, 8, 34, 10, 40, 34, 40, 2, 20, 2, 160, 50, 10, 180, 2, 180, 90, 58, 40, 130, 16, 116, 194, 50, 136, 74, 34, 52, 40
Offset: 1

Views

Author

Thomas Ordowski, Oct 05 2012

Keywords

Comments

Every prime p of the form 4k+1 has a unique solution p = x^2 + y^2. This sequence gives the squared distance between points (x,y) for consecutive primes of this form.
The squares mutual distance consecutive points with coordinates x(n) = A002331(n) and y(n) = A002330(n), where x(n)^2 + y(n)^2 = A002313(n) is prime.
Theorem: a(n) =/= A082073(n-1) for all n > 1. Generally, it can be shown that there is no pair of primes p = a^2 + b^2 and q = x^2 + y^2 such that (a - x)^2 + (b - y)^2 = |p - q| > 0.

Examples

			5 = 1^2 + 2^2 and 13 = 2^2 + 3^2. The squared distance between the points (1,2) and (2,3) is 2, the second term of this sequence.
		

Crossrefs

Programs

  • Mathematica
    nn = 200; p = Select[Prime[Range[nn]], Mod[#, 4] == 1 &]; q = {1, 1}; Table[pp = PowersRepresentations[p[[i]], 2, 2][[1]]; d = pp - q; q = pp; d[[1]]^2 + d[[2]]^2, {i, Length[p] - 1}] (* T. D. Noe, Oct 19 2012 *)

A141614 First differences of A008846.

Original entry on oeis.org

8, 4, 8, 4, 8, 4, 12, 8, 4, 8, 12, 4, 8, 4, 8, 4, 12, 12, 8, 4, 8, 12, 4, 8, 4, 8, 4, 8, 16, 8, 4, 8, 16, 8, 4, 8, 4, 8, 4, 12, 8, 4, 8, 12, 12, 4, 12, 8, 4, 12, 8, 4, 8, 12, 4, 8, 12, 4, 8, 4, 20, 4, 8, 12, 4, 12, 12, 8, 4, 12, 8, 4, 8, 16, 8, 12, 4, 8, 4, 12, 12, 8, 12, 4, 8, 4, 8, 4, 8, 16, 8, 12, 12, 4, 8, 4, 12, 8, 4, 12
Offset: 1

Views

Author

Paul Curtz, Aug 23 2008

Keywords

Comments

Differences between Hypotenuses of primitive Pythagorean triangles.

Crossrefs

Formula

a(n)=A008846(n+1)-A008846(n).

Extensions

Offset set to 1 and extended by R. J. Mathar, Sep 07 2009

A217674 Primes p = a^2 + b^2 such that (x - a)^2 + (y - b)^2 = 2 and q - p = 4, where q = x^2 + y^2 is prime, assuming that a > b > 0 and x > y > 0.

Original entry on oeis.org

13, 313, 613, 3613, 4513, 21013, 52813, 86113, 99013, 148513, 165313, 241513, 255613, 332113, 787513, 800113, 904513, 1073113, 1720513, 2279113, 2679613, 2940313, 3471613, 4307113, 4605613, 4789513, 5168113, 6072613, 6498013, 6716113, 7469113, 8925313
Offset: 1

Views

Author

Thomas Ordowski, Oct 10 2012

Keywords

Comments

The primes p and q have the smallest difference and the shortest distance on the 2-dimensional plane. Primes p = a^2 + (a-1)^2 == 13 (mod 100) and q = (a+1)^2 + (a-2)^2 == 17 (mod 100), where natural a == 3 (mod 5).

Crossrefs

Cf. A217503.

Programs

  • Mathematica
    isP[p_, p1_List, p2_List] := Module[{q = Sort[Abs[p1 + p2]], s}, s = q[[1]]^2 + q[[2]]^2; q != p1 && s - p == 4 && PrimeQ[s]]; testQ[p_] := Module[{pp = PowersRepresentations[p, 2, 2][[1]]}, isP[p, pp, {-1, -1}] || isP[p, pp, {-1, 1}] || isP[p, pp, {1, -1}] || isP[p, pp, {1, 1}]]; Select[Prime[Range[200000]], Mod[#, 4] == 1 && testQ[#] &] (* T. D. Noe, Oct 19 2012 *)

Formula

A002313(n) such that A217503(n) = 2 and A082073(n-1) = 4.
Intersection of A001844 and A023200.
a(n) = A001844(m) for some m == 2 or 12 (mod 15).
a(n) == 13 (mod 300).

Extensions

Extended by T. D. Noe, Oct 19 2012

A212279 A002144(n+1)^2+1 mod A002144(n), where A002144 are the Pythagorean primes (p=4k+1).

Original entry on oeis.org

0, 0, 0, 28, 17, 39, 4, 72, 79, 65, 17, 65, 17, 29, 145, 65, 84, 65, 145, 17, 109, 17, 65, 0, 145, 65, 17, 145, 88, 17, 64, 145, 17, 28, 257, 65, 17, 65, 145, 145, 257, 65, 17, 269, 145, 401, 257, 145, 65, 257, 65, 145, 17, 577, 145, 65, 145, 17, 577, 65, 577
Offset: 1

Views

Author

M. F. Hasler, May 13 2012

Keywords

Comments

Motivated by the fact that the first terms are zero (which is of course a coincidence). Other values (17, 65, 145, 257...) occur much more frequently.
Conjecture: a(n) = A082073(n)^2 + 1 for all n > 159. - Charles R Greathouse IV, May 13 2012

Examples

			5^2+1 = 2*13, 13^2+1 = 10*17, 17^2=10*29; therefore a(1)=a(2)=a(3)=0.
29^2+1 = 22*37+28, therefore a(4)=28.
Kermit Rose's post in the primenumbers Yahoo group:
  >>> (5**2+1)%13
  0
  >>> (13**2+1)%17
  0
  >>> (17**2+1)%29
  0
  Looks remarkable.
  >>> (29**2+1)%37
  28.
  Oops: Break in the pattern. Another illustration of the law of small numbers. :)
		

Programs

  • PARI
    o=5;forprime(p=o+1,900,p%4==1||next;print1((o^2+1)%o=p","))
Showing 1-9 of 9 results.