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.

A023152 Numbers k such that prime(k) == 10 (mod k).

Original entry on oeis.org

1, 7, 19, 21, 2703, 15929, 4124583, 27067051, 179992913, 179993011, 179993159, 1208198559, 1208198859, 55762149031, 382465573511, 382465573547, 18262325820337, 6201265271239229, 6201265271239409, 6201265271239433, 43525513764814941, 43525513764816369, 43525513764816411, 43525513764816437, 306268030480171419
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = 1; Do[ If[ Mod[p = NextPrim[p], n] == 10, Print[n]], {n, 1, 10^9}] (* Robert G. Wilson v, Feb 18 2004 *)
  • PARI
    n=0; forprime(p=2,1e9, if(Mod(p,n++)==10, print1(n", "))) \\ Charles R Greathouse IV, Apr 29 2015
  • Sage
    def A023152(max) :
        terms = []
        p = 2
        for n in range(1,max+1) :
            if (p - 10) % n == 0 : terms.append(n)
            p = next_prime(p)
        return terms
    # Eric M. Schmidt, Feb 05 2013
    

Extensions

Extended by Robert G. Wilson v, Feb 18 2004
a(9)-a(14) from Robert G. Wilson v, Feb 22 2006
First two terms inserted by Eric M. Schmidt, Feb 05 2013
a(15)-a(25) from Giovanni Resta, Feb 23 2020