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

A023145 Numbers k such that prime(k) == 3 (mod k).

Original entry on oeis.org

1, 2, 4, 7, 8, 31, 32, 34, 74, 76, 1052, 6455, 15928, 251707, 251765, 4124458, 27067012, 27067120, 69709718, 69709871, 69709877, 69709934, 69709943, 69709954, 69709963, 69709964, 465769810, 8179002124, 145935689390, 382465573486, 885992692751818, 885992692751822
Offset: 1

Views

Author

Keywords

Examples

			204475053103 = prime(8179002124) and 204475053103 = 25*8179002124 + 3.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 3, Print[n]], {n, 1, 10^9}] (* Robert G. Wilson v, Feb 18 2004 *)
    Select[Range[100000], Mod[Prime[#] - 3, #] == 0 &] (* T. D. Noe, Feb 05 2013 *)
  • Sage
    def A023145(max) :
        terms = []
        p = 2
        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

More terms from Robert G. Wilson v, Feb 18 2004
2 more terms from Giovanni Resta, Feb 22 2006
a(29) from Robert G. Wilson v, Feb 22 2006
First two terms inserted by Eric M. Schmidt, Feb 05 2013
Terms a(30) and beyond from Giovanni Resta, Feb 23 2020

A171431 Primes that are congruent to 4 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 379, 389, 9559969, 9559999, 9560119, 9560149, 514274011, 3779851261, 204475055129, 81744303090431, 241849345578327127, 241849345578334537, 241849345578337111, 241849345578359263, 241849345578372913, 241849345578373303, 97199410027250043229, 97199410027250048629, 97199410027250052679
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^6], Mod[Prime[#] - 4, #] == 0 &] (* Giovanni Resta, Feb 25 2020 *)

Extensions

Missing a(1) and a(8)-a(20) from Giovanni Resta, Feb 23 2020

A171432 Primes that are congruent to 5 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 3, 5, 23, 53, 137, 480881, 480941, 480989, 481001, 481469, 3524099, 3524113, 3524281, 3524309, 70117933, 189961799, 189961907, 189961997, 189962177, 189962609, 189963941, 189963959, 189968729, 514274867, 514282961, 3779851157, 10246935913, 10246936309, 10246936463
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^5], Mod[Prime[#] - 5, #] == 0 &] (* Giovanni Resta, Feb 25 2020 *)

Extensions

a(13) from Harvey P. Dale, Sep 21 2014
Missing a(1)-a(3), a(17) and beyond from Giovanni Resta, Feb 23 2020

A171434 Primes that are congruent to 7 mod n, where n is the index of the prime.

Original entry on oeis.org

2, 3, 7, 13, 61, 151, 397, 1153, 64567, 64577, 480967, 480979, 9559867, 9559897, 9560167, 189961657, 189961819, 189962593, 189963043, 189964321, 189969379, 514272779, 514275401, 1394193607, 1394194727, 1394198807, 10246936003, 75370121191, 75370121767, 75370121839
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Prime@ Select[Range[10^5], Mod[Prime[#] - 7, #] == 0 &] (* Giovanni Resta, Feb 25 2020 *)

Extensions

Missing a(1)-a(4), a(16) and beyond from Giovanni Resta, Feb 23 2020

A360789 Least prime p such that p mod primepi(p) = n.

Original entry on oeis.org

2, 3, 5, 7, 379, 23, 401, 61, 59, 29, 67, 71, 467, 79, 83, 179, 431, 89, 176557, 191, 24419, 491, 97, 101, 499, 1213, 3169, 3191, 523, 229, 3187, 223, 3203, 8609, 3163, 251, 176509, 257, 24509, 263, 3253, 269, 547, 3347, 1304867, 293
Offset: 0

Views

Author

Robert G. Wilson v, Feb 20 2023

Keywords

Comments

Inspired by A048891.

Examples

			For n=0, prime p=2 has p mod primepi(p) = 2 mod 1 = 0 so that a(0) = 2.
For n=4, no prime has p mod primepi(p) = 4 until reaching p=379 which is 379 mod 75 = 4, so that a(4) = 379.
		

Crossrefs

Programs

  • Maple
    V:= Array(0..100): count:= 0:
    p:= 1:
    for k from 1 while count < 101 do
      p:= nextprime(p);
      v:= p mod k;
      if v <= 100 and V[v] = 0 then V[v]:= p; count:= count+1 fi;
    od:
    convert(V,list); # Robert Israel, Feb 28 2023
  • Mathematica
    t[_] := 0; p = 2; pi = 1; While[p < 1400000, m = Mod[p, pi]; If[m < 100 && t[m] == 0, t[m] = p]; p = NextPrime@p; pi++]; t /@ Range[0, 99]
  • PARI
    a(n)={my(k=n); forprime(p=prime(n+1), oo, k++; if(p%k ==n, return(p)))} \\ Andrew Howroyd, Feb 21 2023
    
  • Python
    from sympy import prime, nextprime
    def A360789(n):
        p, m = prime(n+1), n+1
        while p%m != n:
            p = nextprime(p)
            m += 1
        return p # Chai Wah Wu, Mar 18 2023

Formula

a(n) = prime(A073325(n+1)). - Kevin Ryde, Feb 21 2023
Showing 1-5 of 5 results.