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.

A060256 Smallest multiple a(n) of n-th primorial q(n) such that a(n)*q(n)-1 and a(n)*q(n)+1 are a pair of twin primes.

Original entry on oeis.org

2, 1, 1, 2, 1, 6, 8, 11, 4, 16, 22, 4, 74, 24, 37, 28, 14, 11, 242, 11, 91, 20, 83, 91, 35, 80, 48, 47, 226, 2, 12, 203, 30, 38, 356, 54, 266, 108, 305, 227, 173, 1185, 738, 13, 382, 277, 455, 433, 173, 1303, 926, 1162, 164, 298, 69, 121, 702, 1670, 36, 570, 170, 204
Offset: 1

Views

Author

Labos Elemer, Mar 22 2001

Keywords

Examples

			30030*j-1 or 30030*j+1 are not both primes for j=1,2,3,4,5. But for j=6 {180179,180181} are twin primes. So a(6)=6.
		

Crossrefs

Programs

  • Mathematica
    smp[n_]:=Module[{k=1},While[!PrimeQ[k*n+1]||!PrimeQ[k*n-1],k++];k]; Table[ smp[n],{n,FoldList[Times,Prime[Range[70]]]}] (* Harvey P. Dale, Oct 27 2016 *)
  • PARI
    a(n)=p=vecprod(primes(n));for(k=1,+oo,ispseudoprime(k*p+1)&&ispseudoprime(k*p-1)&&return(k)) \\ Jeppe Stig Nielsen, Nov 09 2024

Extensions

Corrected and extended by Ray Chandler, Apr 03 2009