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.

A063091 Prime(n) such that gcd(1+prime(n+1), 1+prime(n)) = gcd(-1+prime(n+1), -1+prime(n)).

Original entry on oeis.org

2, 3, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, 191, 197, 227, 239, 269, 281, 283, 311, 317, 337, 347, 419, 431, 461, 521, 547, 569, 577, 599, 617, 641, 659, 773, 787, 809, 821, 827, 857, 863, 881, 1019, 1031, 1049, 1061, 1091, 1129, 1151, 1153
Offset: 1

Views

Author

Labos Elemer, Aug 06 2001

Keywords

Examples

			p=101 is here because gcd(102,104) = 2 = gcd(100,102).
		

Crossrefs

Cf. A058263.

Programs

  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];If[GCD[p0-1,p1-1]==GCD[p0+1,p1+1],AppendTo[lst,p0]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 11 2010 *)
    Transpose[Select[Partition[Prime[Range[200]],2,1],GCD[First[#]+1, Last[#]+1] == GCD[First[#]-1,Last[#]-1]&]][[1]] (* Harvey P. Dale, Jan 22 2012 *)
  • PARI
    { n=0; for (m=1, 10^9, if(gcd(prime(m+1) + 1, prime(m) + 1) == gcd(prime(m+1) - 1, prime(m) - 1), write("b063091.txt", n++, " ", prime(m)); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 17 2009