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

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A112545 Least odd number k greater than 1 such that the sum of the predecessor and successor primes of the n-th prime is divisible by k or if no such odd k exists then 2. 2
7, 5, 2, 5, 7, 2, 5, 3, 3, 3, 3, 5, 11, 3, 53, 3, 3, 3, 5, 3, 3, 3, 3, 5, 5, 13, 53, 5, 59, 61, 3, 3, 11, 5, 3, 157, 3, 3, 173, 3, 5, 11, 97, 7, 3, 211, 3, 113, 5, 3, 3, 5, 3, 257, 263, 3, 3, 3, 5, 7, 5, 151, 5, 157, 7, 3, 3, 7, 5, 3, 3, 3, 373, 3, 3, 3, 5, 13, 5, 5, 5, 7, 3, 3, 3, 3, 5, 5, 29, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

From Robert Israel, Apr 20 2017: (Start)

a(n) = A078701(prime(n-1)+prime(n+1)) unless that is 1, in which case a(n)=2.

a(n) = 2 if and only if for some m, A007053(m) = n or n-1 with prime(n-1)+prime(n+1) = 2^(m+1). The first m for which this occurs are 3,4,9,379,593, corresponding to n = 4,7,97 and approximately 3*10^116 and 1*10^181.  Are there infinitely many? (End)

LINKS

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

MAPLE

f:= proc(n) local t; t:= min(numtheory:-factorset(ithprime(n-1)+ithprime(n+1)) minus {2}); if t::integer then t else 2 fi end proc:

map(f, [$2..200]); # Robert Israel, Apr 20 2017

MATHEMATICA

f[n_] := Block[{k = 3, s = Prime[n - 1] + Prime[n + 1]}, While[Mod[s, k] != 0 && k <= s, k += 2]; If[k > s, 2, k]]; Table[ f[n], {n, 2, 92}]

PROG

(PARI) a(n) = {p = prime(n); s = precprime(p-1) + nextprime(p+1); f = factor(s); if (#f~ > 1, f[2, 1], f[1, 1]); } \\ Michel Marcus, Apr 22 2017

CROSSREFS

Cf. A000040, A112686, A112681, A112794, A112731, A112789, A112795, A112796, A112804, A112847, A112859, A113155, A113156, A113157, A113158.

Cf. A007053, A078701.

Sequence in context: A258370 A135537 A212038 * A021934 A021097 A307160

Adjacent sequences:  A112542 A112543 A112544 * A112546 A112547 A112548

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Jan 11 2006

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 December 10 00:54 EST 2019. Contains 329885 sequences. (Running on oeis4.)