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.

A105288 Numbers k such that prime(k+1) == 3 (mod k).

Original entry on oeis.org

1, 2, 4, 5, 70, 440, 1055, 1058, 6461, 6466, 6469, 251752, 4124468, 27067036, 27067112, 69709709, 69709957, 465769835, 8179002104, 145935689357, 382465573490
Offset: 1

Views

Author

Zak Seidov, Apr 25 2005

Keywords

Comments

Integers k such that A004649(k+1) = 3. - Michel Marcus, Dec 30 2022

Crossrefs

Programs

  • Magma
    [1,2] cat [n: n in [1..2*10^4] | NthPrime(n+1) mod n eq 3]; // Vincenzo Librandi, May 02 2018
  • Maple
    n:= 0: p:= 2: count:= 0:
    for n from 1 while count < 13 do
    p:= nextprime(p);
    if p-3 mod n = 0 then
        count:= count+1;
      A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, May 02 2018
  • Mathematica
    bb={};Do[If[3==Mod[Prime[n+1], n], bb=Append[bb, n]], {n, 1, 200000}];bb
    Join[{1, 2}, Select[Range[2 10^7], Mod[Prime[# + 1], #]==3 &]] (* Vincenzo Librandi, May 02 2018 *)
  • Sage
    def A105288(max) :
        terms = []
        p = 3
        for n in range(1, max+1) :
            if (p - 3) % n == 0 : terms.append(n)
            p = next_prime(p)
        return terms
    # Eric M. Schmidt, Feb 05 2013
    

Extensions

First two terms inserted by Eric M. Schmidt, Feb 05 2013
a(12)-a(13) from Robert Israel, May 02 2018
a(14)-a(21) from Giovanni Resta, May 02 2018