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-2 of 2 results.

A071558 Smallest k such that n*k + 1 and n*k - 1 are twin primes.

Original entry on oeis.org

4, 2, 2, 1, 6, 1, 6, 9, 2, 3, 18, 1, 24, 3, 2, 12, 6, 1, 12, 3, 2, 9, 6, 3, 6, 12, 4, 15, 12, 1, 42, 6, 6, 3, 12, 2, 54, 6, 8, 6, 30, 1, 24, 15, 4, 3, 6, 4, 18, 3, 2, 6, 120, 2, 12, 48, 4, 6, 18, 1, 258, 21, 14, 3, 30, 3, 24, 15, 2, 6, 18, 1, 84, 27, 2, 3, 6, 4, 132, 3, 10, 15, 54, 5, 12, 12
Offset: 1

Views

Author

Benoit Cloitre, May 30 2002

Keywords

Comments

Conjecture: a(n) < sqrt(n)*log(n) for all n > 17261. This has been verified for n up to 3*10^7. It implies the inequality a(n) < n for each n > 127. - Zhi-Wei Sun, Jan 07 2013
A200996(n) <= a(n). - Reinhard Zumkeller, Feb 14 2013

Crossrefs

Cf. A071407 (k at prime n).
Cf. A220143, A220144 (record values).

Programs

  • Haskell
    a071558 n = head [k | k <- [1..], let x = k * n,
                          a010051' (x - 1) == 1, a010051' (x + 1) == 1]
    -- Reinhard Zumkeller, Feb 14 2013
  • Mathematica
    Table[k=1; While[!And@@PrimeQ[n*k+{1,-1}],k++]; k,{n,86}] (* Jayanta Basu, May 26 2013 *)
  • PARI
    a(n) = my(s=1); while(isprime(s*n+1)*isprime(n*s-1)==0, s++); s;
    

A187808 a(n) = |{0<=k

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 2, 1, 3, 2, 3, 1, 4, 1, 4, 1, 3, 2, 5, 4, 4, 2, 4, 1, 4, 2, 5, 1, 4, 2, 4, 2, 6, 2, 5, 4, 4, 2, 5, 1, 7, 1, 7, 5, 3, 2, 4, 2, 4, 3, 6, 3, 6, 4, 7, 4, 8, 2, 9, 2, 8, 3, 2, 3, 7, 4, 7, 1, 7, 4, 7, 1, 7, 4, 9, 7, 8, 2, 9, 3, 6, 2, 6, 3, 7, 2, 8, 3, 7, 4, 6, 8, 9, 4, 6, 3, 9, 5, 8
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 07 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>1. Moreover, if n>5 is different from 9, 191, 329, 641, 711, 979, then 2k-3, 2k+3, n(n-k)-1, n(n+k)-1 are all prime for some 0
Zhi-Wei Sun also made the following conjectures:
(1) For any integer n>101 there is an integer 0
(2) For each n=128,129,... there is an integer 0

Examples

			a(25) = 1 since 2*17+3 = 37, 25(25-17)-1 = 199, and 25(25+17)-1 = 1049 are all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[2k+3]==True&&PrimeQ[n(n-k)-1]==True&&PrimeQ[n(n+k)-1]==True,1,0],{k,0,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]
Showing 1-2 of 2 results.