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.

A058264 Smallest prime p of two consecutive primes, p < q, such that gcd( p-1, q-1 ) = 2n.

This page as a plain text file.
%I A058264 #18 Mar 05 2025 01:59:42
%S A058264 3,13,31,89,181,661,113,2113,523,13421,2311,4177,35543,39901,4831,
%T A058264 44417,1327,12853,119321,52321,82657,36389,136897,203713,95651,59281,
%U A058264 255259,178697,531919,427621,2640581,1414849,643303,3021173,175141,1770337,514967,1004797,1354393
%N A058264 Smallest prime p of two consecutive primes, p < q, such that gcd( p-1, q-1 ) = 2n.
%C A058264 Since all consecutive primes, p < q and p greater than 2, are odd, therefore gcd( p-1, q-1 ) must be even.
%H A058264 Amiram Eldar, <a href="/A058264/b058264.txt">Table of n, a(n) for n = 1..183</a>
%F A058264 a(n) = prime(A067605(n)). - _Amiram Eldar_, Mar 05 2025
%e A058264 a(4) = 89 because gcd(89-1, 97-1) = gcd(8*11, 8*16) = 8 = 2*4 and these primes are the smallest with this property.
%e A058264 a(49) = 604073 because gcd(604073-1, 604171-1) = gcd(6164*98, 6165*98) = 98 = 2*49.
%t A058264 a = Table[0, {100}]; p = 3; q = 5; Do[q = Prime[n + 1]; d = GCD[p - 1, q - 1]/2; If[d < 101 && a[[d]] == 0, a[[d]] = n]; b = c, {n, 2, 10^7}]; a
%t A058264 With[{tsp={#[[1]],#[[2]],GCD[#[[1]]-1,#[[2]]-1]}&/@Partition[Prime[ Range[ 300000]],2,1]}, Transpose[Flatten[Table[Select[tsp, Last[#]==2n&,1],{n,40}],1]][[1]]] (* _Harvey P. Dale_, Jul 07 2013 *)
%o A058264 (PARI) list(len) = {my(v = vector(len), c = 0, p = 3, i); forprime(q = 5, , i = gcd(p-1, q-1)/2; if(i <= len && v[i] == 0, v[i] = p; c++; if(c == len, break)); p = q); v;} \\ _Amiram Eldar_, Mar 05 2025
%Y A058264 Cf. A006093, A058263, A067605.
%K A058264 nonn
%O A058264 1,1
%A A058264 _Labos Elemer_, Dec 06 2000
%E A058264 Edited by _Robert G. Wilson v_, Feb 01 2002