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.

A113709 a(n) is the composite between p(n) and p(n+1), where p(n) is the n-th prime, which is divisible by (p(n+1)-p(n)).

Original entry on oeis.org

4, 6, 8, 12, 16, 18, 20, 24, 30, 36, 40, 42, 44, 48, 54, 60, 66, 68, 72, 78, 80, 84, 96, 100, 102, 104, 108, 112, 126, 128, 132, 138, 140, 150, 156, 162, 164, 168, 174, 180, 190, 192, 196, 198, 204, 216, 224, 228, 232, 234, 240, 250, 252, 258, 264, 270, 276, 280
Offset: 2

Views

Author

Leroy Quet, Nov 06 2005

Keywords

Comments

Exactly one composite exists between each p(n+1) and p(n) which is divisible by (p(n+1)-p(n)), for n >= 2.

Examples

			Between the primes 67 and 71 is the composite 68 and 68 is divisible by (71-67)=4. So 68 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = Prime[n], q = Prime[n + 1]}, q - Mod[p, q - p]]; Table[ f[n], {n, 2, 60}] (* Robert G. Wilson v *)
    cbp[{a_,b_}]:=Select[Range[a+1,b-1],Divisible[#,b-a]&]; cbp/@ Partition[ Prime[ Range[2,100]],2,1]//Flatten (* Harvey P. Dale, Jan 09 2019 *)

Formula

a(n)=p(n+1) - (p(n) (mod p(n+1)-p(n))).

Extensions

More terms from Don Reble and Robert G. Wilson v, Nov 07 2005