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.

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}.