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.

A084316 a(n) is the smallest number x such that gcd(prime(x)+1,x+1) = n.

Original entry on oeis.org

1, 3, 20, 11, 24, 5, 6, 39, 98, 29, 120, 23, 64, 13, 104, 15, 1716, 323, 284, 499, 62, 1099, 1264, 215, 1274, 51, 512, 447, 1768, 209, 1332, 31, 32, 373, 34, 1475, 258, 835, 2300, 519, 5780, 419, 5374, 1275, 6974, 1655, 6626, 479, 10240, 10549, 3008, 883, 13938
Offset: 1

Views

Author

Labos Elemer, Jun 13 2003

Keywords

Comments

a(n) == n+1 (mod 2). - Robert Israel, May 04 2017

Examples

			In A066752, n=5 arises first at the 24th position, so a(5)=24.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local x;
      for x from n-1 by ilcm(n,2) do
        if igcd(x+1, ithprime(x)+1) = n then return x fi
      od
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, May 04 2017
  • Mathematica
    f[x_]:=GCD[Prime[x]+1,x+1]; t=Table[0,{256}];Do[s=f[n];If[s<257&&t[[s]] == 0,t[[s]] = n],{n,1,100000}];t (* edited by Harvey P. Dale, Jan 28 2023 *)
    Module[{nn=20000,t},t=Table[{x,GCD[Prime[x]+1,x+1]},{x,nn}];Table[SelectFirst[t,#[[2]]==n&],{n,60}]][[All,1]] (* Harvey P. Dale, Jan 28 2023 *)

Formula

a(n) = Min{x; A066752(x)=n}.

A084310 a(n) = gcd(prime(n)+1, n).

Original entry on oeis.org

1, 2, 3, 4, 1, 2, 1, 4, 3, 10, 1, 2, 1, 2, 3, 2, 1, 2, 1, 4, 1, 2, 1, 6, 1, 2, 1, 4, 1, 6, 1, 4, 3, 2, 5, 4, 1, 2, 3, 2, 1, 14, 1, 2, 9, 2, 1, 16, 1, 10, 3, 4, 1, 18, 1, 8, 3, 2, 1, 6, 1, 2, 7, 8, 1, 6, 1, 2, 3, 70, 1, 72, 1, 2, 5, 4, 1, 2, 1, 10, 3, 2, 1, 14, 5, 2, 3, 2, 1, 2, 13, 4, 1, 2, 5, 24, 1, 2, 1, 2
Offset: 1

Views

Author

Labos Elemer, Jun 13 2003

Keywords

Crossrefs

Programs

A084311 a(n) = gcd(prime(n)-1,n-1).

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 2, 1, 2, 1, 10, 1, 4, 1, 2, 1, 2, 1, 6, 1, 4, 3, 2, 1, 24, 25, 2, 1, 4, 1, 6, 1, 8, 3, 2, 5, 12, 1, 2, 1, 2, 1, 2, 1, 4, 9, 2, 1, 2, 1, 2, 17, 4, 1, 2, 1, 4, 3, 2, 1, 6, 1, 2, 1, 8, 1, 66, 1, 2, 3, 2, 1, 6, 1, 2, 1, 4, 11, 2, 1, 2, 3, 2, 1, 6, 17, 2, 3, 4, 1, 2, 1, 2, 1, 2, 1, 4, 1, 2, 9, 2, 1
Offset: 1

Views

Author

Labos Elemer, Jun 13 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[GCD[Prime[w]-1, w-1], {w, 1, 128}]
  • PARI
    a(n) = gcd(prime(n)-1, n-1); \\ Michel Marcus, May 04 2017

A084315 a(n) = x is the smallest number such that gcd(prime(x)-1,x-1) = n.

Original entry on oeis.org

1, 3, 4, 13, 36, 19, 120, 33, 46, 11, 78, 37, 560, 239, 496, 1905, 52, 397, 3250, 221, 778, 573, 2738, 25, 26, 287, 352, 477, 552, 271, 8588, 449, 5710, 205, 456, 145, 1000, 4067, 2536, 761, 14638, 295, 4344, 2685, 406, 1151, 612, 3121, 6616, 551, 868, 469, 20088
Offset: 1

Views

Author

Labos Elemer, Jun 13 2003

Keywords

Examples

			In A084311, n=4 arises first at the 13th position, so a(4)=13.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := GCD[Prime[x]-1, x-1] t=Table[0, {256}]; Do[s=f[n]; If[s<257&&t[[s]]==0, t[[s]]=n], {n, 1, 100000}]; t

Formula

a(n) = Min{x; A084311(x)=n}.

A066752 a(n) = gcd(prime(n)+1, n+1).

Original entry on oeis.org

1, 1, 2, 1, 6, 7, 2, 1, 2, 1, 4, 1, 14, 1, 16, 1, 6, 1, 4, 3, 2, 1, 12, 5, 2, 3, 4, 1, 10, 1, 32, 33, 2, 35, 6, 1, 2, 1, 8, 1, 6, 1, 4, 1, 2, 1, 4, 7, 2, 1, 26, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 21, 4, 13, 2, 1, 4, 1, 2, 1, 6, 1, 2, 1, 76, 1, 78, 1, 2, 1, 2, 1, 12, 1, 2, 3, 2, 1, 6, 1, 4, 3, 2, 1, 4, 1, 2, 9, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 16 2002

Keywords

Examples

			a(23) = gcd(prime(23)+1,23+1) = gcd(83+1,24) = gcd(84,24) = 12*gcd(7,2) = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[Prime[w]+1, w+1], {w, 1, 128}]
  • PARI
    { for (n=1, 1000, write("b066752.txt", n, " ", gcd(prime(n) + 1, n + 1)) ) } \\ Harry J. Smith, Mar 22 2010

Extensions

More terms from Labos Elemer, Jun 13 2003

A084313 a(n)=x is the smallest number such that gcd(prime(x)-1, x) = n.

Original entry on oeis.org

1, 2, 21, 16, 5, 6, 315, 24, 63, 20, 121, 12, 65, 14, 105, 320, 697, 306, 2185, 60, 399, 286, 299, 216, 575, 156, 513, 644, 1189, 210, 837, 384, 231, 374, 1505, 684, 3515, 1026, 1131, 1480, 2747, 966, 1591, 1012, 1935, 782, 1645, 1776, 30429, 7600, 3009
Offset: 1

Views

Author

Labos Elemer, Jun 13 2003

Keywords

Crossrefs

Programs

  • Mathematica
    f[x_] := GCD[Prime[x]-1, x] t=Table[0, {256}]; Do[s=f[n]; If[s<257&&t[[s]]==0, t[[s]]=n], {n, 1, 100000}]; t
    Table[Module[{x=1},While[GCD[Prime[x]-1,x]!=n,x++];x],{n,60}] (* Harvey P. Dale, Aug 23 2025 *)

Formula

a(n) = Min{x; A084309(x)=n}.

A084314 a(n) = x is the smallest number such that gcd(prime(x)+1, x) = n.

Original entry on oeis.org

1, 2, 3, 4, 35, 24, 63, 56, 45, 10, 649, 132, 91, 42, 495, 48, 153, 54, 779, 700, 1785, 264, 851, 96, 1125, 286, 1647, 672, 551, 570, 341, 448, 2277, 1462, 385, 144, 1369, 418, 2145, 1000, 4797, 294, 817, 1804, 405, 414, 7003, 2016, 11515, 950, 2193, 2444
Offset: 1

Views

Author

Labos Elemer, Jun 13 2003

Keywords

Crossrefs

Programs

  • Mathematica
    f[x_] := GCD[Prime[x]+1, x] t=Table[0, {256}]; Do[s=f[n]; If[s<257&&t[[s]]==0, t[[s]]=n], {n, 1, 100000}]; t
    Module[{cc=Table[{x,GCD[Prime[x]+1,x]},{x,20000}]},Transpose[Table[ SelectFirst[ cc,#[[2]]==n&],{n,60}]][[1]]] (* Harvey P. Dale, Nov 28 2014 *)

Formula

a(n) = Min{x; A084310(x)=n}.

A180172 a(n) = gcd(prime(n)+2, n).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 11, 3, 1, 1, 1, 1, 1, 9, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 1, 1, 1, 9, 1, 1, 13, 5, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 11, 1, 1, 1, 1, 71, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 7, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1
Offset: 1

Views

Author

Zak Seidov, Aug 15 2010

Keywords

Crossrefs

Programs

  • Magma
    [GCD(n,NthPrime(n) +2): n in [1..110]]; // G. C. Greubel, Mar 12 2023
    
  • Mathematica
    Table[GCD[n,Prime[n]+2],{n,200}]
  • SageMath
    [gcd(nth_prime(n) + 2, n) for n in range(1,111)] # G. C. Greubel, Mar 12 2023

A180173 a(n) = gcd(prime(n)-2, n).

Original entry on oeis.org

1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 13, 1, 15, 1, 1, 1, 1, 1, 1, 11, 1, 3, 5, 1, 1, 7, 1, 3, 1, 1, 3, 1, 7, 1, 1, 1, 3, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 1, 3, 1, 1, 3, 5, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 69, 1, 1, 3, 73, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3
Offset: 1

Views

Author

Zak Seidov, Aug 15 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Table[GCD[n,Prime[n]-2],{n,200}]
Showing 1-9 of 9 results.