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.

A264886 Integers n such that A061720(n-1) + 1 or A061720(n-1) - 1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 15, 25, 36, 57, 80, 81, 133, 225, 281, 282, 288, 343, 632, 653
Offset: 1

Views

Author

Altug Alkan, Nov 27 2015

Keywords

Comments

Integers n such that A002110(n) - A002110(n-1) + 1 or A002110(n) - A002110(n-1) - 1 is prime.
Are there any other squares in sequence?

Examples

			a(3) = 3 because 2*3*5 - 2*3 - 1 = 23 is prime.
a(6) = 8 because 2*3*5*7*11*13*17*19 - 2*3*5*7*11*13*17 + 1 = 9189181 is prime.
		

Crossrefs

Programs

  • Mathematica
    t = Differences[FoldList[Times, 1, Prime@ Range@ 1200]]; Select[Range@ 360, Or[PrimeQ[t[[# - 1]] + 1], PrimeQ[t[[# - 1]] - 1]] &] - 1 (* Michael De Vlieger, Nov 28 2015, after Alonso del Arte at A061720 *)
  • PARI
    a(n) = prod(k=1, n, prime(k));
    for(n=0, 1e3, if(ispseudoprime(a(n)-a(n-1)-1) || ispseudoprime(a(n)-a(n-1)+1), print1(n, ", ")))