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.

A099728 Least number B such that (A001359(n) - B^2)^2 - B is also the lesser of larger twin primes, or 0 if no such B exists.

Original entry on oeis.org

380, 14, 5, 5, 365, 8, 5, 5, 14, 20, 5, 20, 8, 65, 8, 95, 35, 8, 14, 65, 20, 65, 8, 17, 350, 188, 5, 104, 98, 68, 35, 17, 158, 35, 92, 50, 62, 5, 26, 8, 8, 68, 233, 110, 5, 50, 23, 23, 8, 65, 59, 35, 14, 23, 35, 20, 47, 140, 5, 50, 14, 5, 44, 125, 386, 713, 23, 59, 44, 635, 98
Offset: 1

Views

Author

Ray G. Opao, Nov 07 2004

Keywords

Comments

Conjecture: No term is zero.

Examples

			a(3) = 5 since A001359(3) = 11, 11 and 13 are twin primes, (11 - 5^2)^2 - 5 = 191, and 191 and 193 are also twin primes.
		

Crossrefs

Programs

  • Maple
    a135 := [] : f := fopen("b001359.txt",READ) : while nops(a135) < 200 do l := fscanf(f,"%d %d") : if l = [] then break : else a135 := [op(a135),l[2]] : fi ; od : for n from 1 to nops(a135) do a := op(n,a135) : B := 0 : while true do srch := (a-B^2)^2-B ; if isprime(srch) and isprime(srch+2) and srch > a then printf("%d, ",B) ; break ; fi ; B := B+1 : od : od: # R. J. Mathar, Aug 06 2007
  • Mathematica
    f[p_] := Module[{b = 1}, While[(pb = (p - b^2)^2 - b) <= p || ! And @@ PrimeQ[pb + {0, 2}], b++]; b]; seq = {}; Do[If[And @@ PrimeQ[p + {0, 2}], AppendTo[seq, f[p]]], {p, 2, 3000}]; seq (* Amiram Eldar, Dec 30 2019 *)

Extensions

Corrected and extended by R. J. Mathar, Aug 06 2007
Data corrected by Amiram Eldar, Dec 30 2019