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.

A162565 Those primes p such that (p-q) divides (p-1), where q is the greatest prime < p.

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 31, 37, 41, 43, 61, 67, 73, 79, 97, 101, 103, 109, 113, 127, 139, 151, 157, 163, 181, 191, 193, 197, 199, 229, 233, 241, 251, 271, 277, 281, 283, 313, 317, 337, 349, 353, 373, 379, 401, 409, 421, 431, 433, 439, 457, 461, 463, 523, 541, 547
Offset: 1

Views

Author

Leroy Quet, Jul 06 2009

Keywords

Comments

A006512 (greater of twin primes) is a subsequence. - Michel Marcus, Feb 27 2019
Except for 11, A090609 is a subsequence. - Davide Rotondo, Feb 12 2025

Examples

			The 17th prime is 59 and the 18th prime is 61. (61-59) = 2, and 2 divides 61-1 = 60. So 61 is in the sequence.
		

Crossrefs

Programs

  • Maple
    A162565 := proc(n) local p,q; p := ithprime(n) ; q := prevprime(p) ; if (p-1) mod (p-q) = 0 then printf("%d,",p); fi; end: seq(A162565(n),n=2..200) ; # R. J. Mathar, Jul 13 2009
  • Mathematica
    Transpose[Select[Partition[Prime[Range[110]],2,1],Divisible[#[[2]]-1, #[[2]] - #[[1]]]&]][[2]] (* Harvey P. Dale, Mar 18 2016 *)
  • PARI
    isok(p) = isprime(p) && !((p-1) % (p-precprime(p-1))); \\ Michel Marcus, Feb 12 2025

Extensions

More primes from R. J. Mathar, Jul 13 2009