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.

Showing 1-1 of 1 results.

A110975 Numbers n such that 2*prime(n) - prime(n+1) is a square.

Original entry on oeis.org

1, 2, 5, 6, 11, 24, 49, 50, 73, 87, 182, 183, 202, 203, 307, 309, 379, 458, 459, 520, 677, 961, 1001, 1475, 1618, 1619, 1769, 2089, 2427, 2428, 3303, 3378, 4090, 4397, 4944, 5444, 5969, 6496, 6497, 7653, 8557, 8871, 8873, 9091, 9526, 10524, 11580, 11824
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 28 2005

Keywords

Crossrefs

Cf. A110970.

Programs

  • Maple
    Res:= NULL:  p:= 2; count:= 0:
    for n from 1 while count < 100 do
      q:= p; p:= nextprime(p);
      if issqr(2*q-p) then count:= count+1; Res:= Res, n; fi
    od:
    Res; # Robert Israel, Mar 02 2020
  • Mathematica
    Select[Range[12000], IntegerQ[(2Prime[ # ] - Prime[ # + 1])^(1/2)] &] (* Ray Chandler, Oct 07 2005 *)
    Position[2#[[1]]-#[[2]]&/@Partition[Prime[Range[12000]],2,1],?(IntegerQ[ Sqrt[#]]&)]//Flatten (* _Harvey P. Dale, Apr 30 2019 *)

Extensions

Corrected and extended by Ray Chandler, Oct 07 2005
Showing 1-1 of 1 results.