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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213187 a(n) = (p+1)/2 if 4 | p+1, and p otherwise, where p is the least prime > n with 2(n+1)-p prime. 1
2, 2, 5, 5, 4, 4, 6, 6, 13, 6, 13, 13, 17, 17, 10, 17, 10, 10, 12, 12, 16, 12, 29, 16, 29, 16, 37, 29, 16, 16, 41, 37, 37, 41, 41, 37, 24, 41, 22, 41, 22, 22, 24, 24, 61, 24, 53, 61, 53, 30, 61, 53, 61, 34, 30, 61, 73, 30, 61, 61, 36, 34, 34, 36, 36, 34, 42, 36, 73, 36, 73, 73, 89, 40, 40, 42, 42, 40, 89, 42, 97, 42, 89, 97, 89, 101, 97, 89, 97, 52, 101, 97, 109, 101, 52, 97, 54, 101, 52, 101 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Conjecture: If b(1)>2 is an integer, and b(k+1)=a(b(k)) for k=1,2,3,..., then b(n)=4 for some n>0.

For example, if we start from b(1)=45 then we get the sequence 45, 61, 36, 37, 24, 16, 17, 10, 6, 4, 5, 4, ...

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 1..10000

Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588.

EXAMPLE

a(8)=6 since 2(8+1)=11+5 with (11+1)/2=6;

a(9)=13 since 2(9+1)=13+7.

MATHEMATICA

Do[Do[If[PrimeQ[2n+2-Prime[k]]==True, Print[n, " ", If[Mod[Prime[k], 4]==3, (Prime[k]+1)/2, Prime[k]]]; Goto[aa]], {k, PrimePi[n]+1, PrimePi[2n]}];

Label[aa]; Continue, {n, 1, 100}]

nxt[{n_, a_}]:=Module[{p=NextPrime[n]}, While[!PrimeQ[2(n+1)-p], p = NextPrime[ p]]; {n+1, If[Divisible[p+1, 4], (p+1)/2, p]}]; Rest[ Transpose[ NestList[ nxt, {1, 2}, 110]][[2]]] (* Harvey P. Dale, May 30 2016 *)

PROG

(PARI) a(n)=my(q=nextprime(n+1)); while(!isprime(2*n+2-q), q=nextprime(q+1)); if(q%4<3, q, (q+1)/2) \\ Charles R Greathouse IV, Feb 28 2013

CROSSREFS

Cf. A002372, A222566, A222532.

Sequence in context: A236935 A008280 A239005 * A317921 A195710 A321304

Adjacent sequences:  A213184 A213185 A213186 * A213188 A213189 A213190

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Feb 28 2013

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 26 04:37 EDT 2019. Contains 322469 sequences. (Running on oeis4.)