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.

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

This page as a plain text file.
%I A071558 #47 Aug 29 2025 04:15:07
%S A071558 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,
%T A071558 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,
%U A071558 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
%N A071558 Smallest k such that n*k + 1 and n*k - 1 are twin primes.
%C A071558 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
%C A071558 A200996(n) <= a(n). - _Reinhard Zumkeller_, Feb 14 2013
%H A071558 Zhi-Wei Sun, <a href="/A071558/b071558.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%t A071558 Table[k=1; While[!And@@PrimeQ[n*k+{1,-1}],k++]; k,{n,86}] (* _Jayanta Basu_, May 26 2013 *)
%o A071558 (PARI) a(n) = my(s=1); while(isprime(s*n+1)*isprime(n*s-1)==0, s++); s;
%o A071558 (Haskell)
%o A071558 a071558 n = head [k | k <- [1..], let x = k * n,
%o A071558                       a010051' (x - 1) == 1, a010051' (x + 1) == 1]
%o A071558 -- _Reinhard Zumkeller_, Feb 14 2013
%Y A071558 Cf. A071256, A001097, A086686, A034693.
%Y A071558 Cf. A071407 (k at prime n).
%Y A071558 Cf. A220143, A220144 (record values).
%K A071558 easy,nonn,changed
%O A071558 1,1
%A A071558 _Benoit Cloitre_, May 30 2002