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-3 of 3 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)).

A322569 a(n)=x is the least integer such that gcd(sigma(x), sigma(x+1)) = 2*n.

Original entry on oeis.org

13, 6, 5, 27, 57, 22, 12, 93, 89, 236, 1032, 14, 467, 83, 58, 308, 201, 118, 147, 56, 82, 1204, 6301, 69, 596, 1142, 106, 91, 4167, 87, 432, 381, 393, 1407, 348, 70, 5912, 453, 233, 417, 13692, 166, 56493, 1118, 88, 6987, 54048, 154, 1843, 4490, 6833, 2574, 633, 689, 1538
Offset: 1

Views

Author

Michel Marcus, Aug 29 2019

Keywords

Comments

Bisection of A084307.

Crossrefs

Programs

  • Magma
    sol:=[]; for n in [1..55] do k:=1; while Gcd(DivisorSigma(1,k),DivisorSigma(1,k+1)) ne 2*n do k:=k+1; end while; Append(~sol,k); end for; sol; // Marius A. Burtea, Aug 29 2019
  • Mathematica
    Module[{nn=60000,g},g=GCD@@@Partition[DivisorSigma[1,Range[nn]],2,1];Table[ Position[ g,2n,1,1],{n,55}]]//Flatten (* Harvey P. Dale, Jan 28 2023 *)
  • PARI
    a(n) = my(x=1); while(gcd(sigma(x), sigma(x+1)) != 2*n, x++); x;
    

A364890 Least number k such that A060778(k) = n.

Original entry on oeis.org

1, 2, 49, 14, 80, 44, 529983, 104, 16640, 2511, 8212890624, 735, 1019423412224, 29888, 600624, 2295, 54020648488730624, 6075, 3018417549254328320, 5264, 123200, 24151040, 3264402128528250685620224, 5984, 1753599375, 689278976, 2310399, 156735, 27965083137654166225393025024, 180224, 11404289746101879774056466612224, 21735, 170853262335, 2035980763136, 207593229375, 223244
Offset: 1

Views

Author

Seiichi Manyama, Aug 12 2023

Keywords

Crossrefs

Programs

  • PARI
    a(n) = my(x=1, nx=1, ny=2); while(gcd(nx, ny) != n, x++; nx=ny; ny=numdiv(x+1)); x;

Extensions

a(11),a(13),a(17),a(19),a(23)-a(36) from Max Alekseyev, Feb 18 2024
Showing 1-3 of 3 results.