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-2 of 2 results.

A067605 Least k such that gcd(prime(k+1)-1, prime(k)-1) = 2n.

Original entry on oeis.org

2, 6, 11, 24, 42, 121, 30, 319, 99, 1592, 344, 574, 3786, 4196, 650, 4619, 217, 1532, 11244, 5349, 8081, 3861, 12751, 18281, 9221, 5995, 22467, 16222, 43969, 35975, 192603, 108146, 52313, 218234, 15927, 132997, 42673, 78858, 103865, 84483, 111172, 175288, 110734
Offset: 1

Views

Author

Robert G. Wilson v, Jan 31 2002

Keywords

Comments

Since all consecutive primes, p < q and p greater than 2, are odd, therefore gcd(p-1, q-1) must be even.

Examples

			For n = 4: a(4) = 24 = gcd(89-1, 97-1) = gcd(p(24)-1, p(25)-1) = 8 = 2*4.
		

Crossrefs

Programs

  • Maple
    N:= 50: # for a(1)..a(N)
    V:= Vector(N): count:= 0:
    p:= 3:
    for k from 2 while count < N do
      q:= p;
      p:= nextprime(p);
      v:= igcd(p-1,q-1)/2;
      if v <= N and V[v] = 0 then
        count:= count+1; V[v]:= k;
      fi
    od:
    convert(V,list); # Robert Israel, Mar 05 2025
  • Mathematica
    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
  • PARI
    list(len) = {my(v = vector(len), c = 0, p = 3, k = 2, i); forprime(q = 5, , i = gcd(p-1, q-1)/2; if(i <= len && v[i] == 0, v[i] = k; c++; if(c == len, break)); p = q; k++); v;} \\ Amiram Eldar, Mar 05 2025

Formula

a(n) = PrimePi(A058264(n)).

A084307 a(n) is the least number x such that gcd(sigma(x), sigma(x+1)) = n.

Original entry on oeis.org

1, 13, 17, 6, 199, 5, 242, 27, 391, 57, 1296, 22, 882, 12, 648, 93, 175232, 89, 3872, 236, 195, 1032, 4875263, 14, 5739271, 467, 35377, 83, 1882384, 58, 3024, 308, 29240, 201, 1627208, 118, 79524, 147, 1682, 56, 46854024, 82, 229441, 1204, 2047, 6301, 83386957823
Offset: 1

Views

Author

Labos Elemer, Jun 13 2003

Keywords

Comments

a(47) > 10^9 if it exists. - Michel Marcus, Sep 01 2019

Examples

			n=9: GCD[sigma[x+1], sigma[x]]=5 holds for {391,799,800,881,...} of which the first is a(9)=391.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := GCD[DivisorSigma[1, x], DivisorSigma[1, x+1]] t=Table[0, {256}]; Do[s=f[n]; If[s<257&&t[[s]]==0, t[[s]]=n], {n, 1, 10000000}]; t
  • PARI
    a(n) = my(x=1, sx=sigma(x), y=2, sy=sigma(2)); while(gcd(sx, sy) != n, x++; y++; sx=sy; sy=sigma(y)); x; \\ Michel Marcus, Aug 28 2019

Extensions

a(41) from Rémy Sigrist, Aug 29 2019
a(42)-a(46) from Michel Marcus, Aug 30 2019
a(47) from Giovanni Resta, Oct 29 2019
Showing 1-2 of 2 results.