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.

A113339 Integers n such that prime(n+1)-prime(n) is nonprime, squarefree. Except for the initial term of 1, the terms are k-semiprime for some k>=2.

Original entry on oeis.org

1, 9, 11, 15, 16, 18, 21, 23, 30, 32, 34, 36, 37, 39, 40, 42, 51, 53, 54, 55, 56, 58, 61, 62, 66, 67, 68, 71, 73, 74, 76, 80, 82, 84, 86, 96, 100, 101, 102, 103, 105, 106, 107, 108, 110, 111, 115, 118, 119, 123, 125, 127, 129, 130, 133, 137, 138, 141, 145, 146, 150
Offset: 1

Views

Author

Walter Kehowski, Jan 08 2006

Keywords

Examples

			prime(69)-prime(68)=347-337=10=2*5.
		

Crossrefs

Programs

  • Maple
    L:=[]: for z to 1 do for k from 1 to 200 do p:=ithprime(k); q:=nextprime(p); x:=q-p; if not(isprime(x)) and issqrfree(x) then L:=[op(L),k] fi od od; L;
  • Mathematica
    Flatten[Position[Flatten[Differences/@Partition[Prime[Range[200]],2,1]],?(!PrimeQ[#] && SquareFreeQ[#]&)]]//Rest (* _Harvey P. Dale, Sep 10 2022 *)

Formula

prime(n+1)-prime(n)=1 or p1*...*pk where p1, ..., pk are two or more distinct primes.