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.

A294639 a(n) = least prime p such that n divides p + prime(n).

Original entry on oeis.org

2, 3, 7, 5, 19, 5, 11, 5, 13, 11, 2, 11, 11, 13, 13, 11, 43, 11, 47, 29, 11, 31, 101, 7, 3, 3, 5, 5, 7, 7, 59, 29, 61, 31, 61, 29, 139, 103, 67, 67, 67, 29, 67, 71, 73, 31, 71, 17, 67, 71, 73, 73, 607, 19, 73, 17, 73, 19, 313, 19, 83, 17, 71, 73, 337, 13, 71
Offset: 1

Views

Author

Rémy Sigrist, Nov 05 2017

Keywords

Comments

This sequence was inspired by A134204.
The logarithmic scatterplot of the sequence has interesting features (see Links section).
We observe runs of consecutive equal terms:
- first pair: a(12) = a(13) = 11,
- first triple: a(39) = a(40) = a(41) = 67,
- first quadruple: a(24980) = a(24981) = a(24982) = a(24983) = 12983.
a(1) = prime(1).
a(2) = prime(2).

Examples

			For n=3:
- prime(3) = 5,
- 3 does not divide 2 + 5,
- 3 does not divide 3 + 5,
- 3 does not divide 5 + 5,
- 3 divides 7 + 5,
- hence a(3) = 7.
		

Crossrefs

Programs

  • PARI
    a(n) = my (q=prime(n)); forprime(p=2,, if ((p+q)%n==0, return (p)))