login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A307833 Smallest k > 1 such that A014574(n)*k is adjacent to a prime. 2
2, 2, 2, 2, 2, 2, 3, 5, 3, 4, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 5, 2, 2, 4, 3, 3, 2, 2, 2, 2, 2, 3, 2, 4, 3, 2, 2, 2, 3, 6, 3, 2, 2, 2, 3, 4, 2, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 4, 2, 3, 2, 3, 2, 2, 4, 3, 2, 2, 5, 2, 4, 4, 4, 4, 3, 2, 5, 2, 3, 4, 2, 4, 4, 2, 2, 2, 4, 2, 6, 4, 2, 2, 5, 4, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

It is perhaps surprising that the values in this sequence are so small. For n < 8000 the largest value of a(n) is 20, which occurs for n = 4928. Also for n < 8000, a(n) is 2 on 2449 occasions.

a(n)=2 if and only if A014574(n)+1 is in A038869 or A014574(n)-1 is in A045536. - Robert Israel, Jul 17 2019

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A309120(A014574(n)). - Robert Israel, Jul 17 2019

EXAMPLE

72*5 = 360, which is adjacent to the prime 359, so a(8) = 5.

MAPLE

P:= {seq(ithprime(i), i=1..10^4)}:

A014574:= sort(convert(map(t -> t+1, P intersect map(`-`, P, 2)), list)):

f:= proc(m) local k;

  for k from 2 do

    if isprime(k*m-1) or isprime(k*m+1) then return k fi

  od

end proc:

map(f, A014574); # Robert Israel, Jul 17 2019

MATHEMATICA

primeNearQ[n_] := AnyTrue[{-1, 1} + n, PrimeQ]; twinMidQ[n_] := AllTrue[{-1, 1} + n, PrimeQ]; f[n_] := Module[{k = 2}, While[! primeNearQ[k*n], k++]; k]; f /@ Select[Range[10^4], twinMidQ] (* Amiram Eldar, Jul 05 2019 *)

PROG

(PARI) isok2(n) = isprime(n-1) && isprime(n+1);

k(n) = my(k=2); while (! (isprime(n*k-1) || isprime(n*k+1)), k++); k;

lista(nn) = for (n=1, nn, if (isok2(n), print1(k(n), ", "))); \\ Michel Marcus, May 01 2019

CROSSREFS

Cf. A014574, A038869, A045536, A307775, A309120.

Sequence in context: A137722 A081305 A035665 * A331566 A083261 A003648

Adjacent sequences:  A307830 A307831 A307832 * A307834 A307835 A307836

KEYWORD

nonn

AUTHOR

Dmitry Kamenetsky, May 01 2019

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 May 28 13:20 EDT 2020. Contains 334683 sequences. (Running on oeis4.)