login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065865 a(n) is the least k such that nk - 1 and nk + 1 are both composite. 1
5, 13, 3, 14, 1, 20, 1, 7, 1, 5, 1, 10, 1, 4, 1, 4, 1, 8, 1, 6, 1, 7, 1, 5, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 4, 1, 2, 1, 3, 1, 17, 1, 4, 1, 2, 1, 3, 1, 1, 1, 4, 1, 4, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 8, 1, 3, 1, 8, 1, 2, 1, 4, 1, 1, 1, 8, 1, 2, 1, 3, 1, 11, 1, 1, 1, 2, 1, 10, 1, 1, 1, 1, 1, 3, 1, 4, 1, 3, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Inspired by the entry on "120" in David Wells's Dictionary of Curious and Interesting Numbers. Question: Is 20 the maximum value of a(n)?

The maximum value of a(n) for n <= 10^9 is a(6)=20. a(52270140)=18. Up to n=10^9: 20,19,18,17,16,15,14,13,12,11 occur 1,0,1,1,0,0,8,21,46,184 times, respectively. - Rick L. Shepherd, Aug 31 2005

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..1000

EXAMPLE

a(4) = 14 since k = 14 is the least k such that 4k - 1 and 4k + 1 are both composite.

PROG

(PARI) for(n=1, 150, k=1; while(isprime(k*n-1)||isprime(k*n+1), k++); print1(k, ", ")) (Shepherd)

(PARI) { for (n = 1, 1000, a=1; while(isprime(a*n - 1) || isprime(a*n + 1), a++); write("b065865.txt", n, " ", a) ) } \\ Harry J. Smith, Nov 02 2009

CROSSREFS

Sequence in context: A065934 A282063 A035412 * A088618 A121645 A057691

Adjacent sequences:  A065862 A065863 A065864 * A065866 A065867 A065868

KEYWORD

nonn

AUTHOR

Joseph L. Pe, Dec 06 2001

EXTENSIONS

More terms from Rick L. Shepherd, Aug 31 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:34 EDT 2019. Contains 322241 sequences. (Running on oeis4.)