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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229019 Minimal position at which the sequence defined in the same way as A159559 but with initial term prime(n) merges with A159559; a(n)=0 if there is no such position. 10
2, 11, 47, 47, 47, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 683, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 1117, 6257, 6257, 6257, 6257, 6257, 6257, 6257, 6257, 390703, 390703, 390703, 390703, 390703, 390703, 390703, 390703 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

COMMENTS

All positive terms of the sequence are prime.

Conjecture: all terms are positive.

LINKS

Table of n, a(n) for n=2..45.

V. Shevelev, Several results on sequences which are similar to the positive integers, arXiv:0904.2101 [math.NT], 2009.

EXAMPLE

For n>=2, denote by A_n the sequence defined in the same way as A159559 but with initial term A_n(2)=prime(n). In case n=2 A_2(2)=3, hence A_2 = A159559, and so a(2)=2. Suppose n=3. Then A_3(2)=5 and by the definition of A159559 we have A_3(3)=7, A_3(4)=8, A_3(5)=11, A_3(6)=12, A_3(7)=13, A_3(8)=14, A_3(9)=15, A_3(10)=16, A_3(11)=17. Since A159559(11) is also 17, then, beginning with 11, A_3 merges with A159559 and a(3)=11. - Vladimir Shevelev, Sep 11 2016.

MAPLE

b:= proc(n, p) option remember; local m;

      if n=2 then p

    else for m from b(n-1, p)+1 while isprime(m) xor isprime(n)

         do od; m

      fi

    end:

a:= proc(n) option remember; local k;

      for k from 2 while b(k, 3)<>b(k, ithprime(n)) do od; k

    end:

seq(a(n), n=2..20);  # Alois P. Heinz, Sep 15 2013

MATHEMATICA

f[n_, r_] := Block[{a}, a[2] = n; a[x_] := a[x] = If[PrimeQ@ x, NextPrime@ a[x - 1], NestWhile[# + 1 &, a[x - 1] + 1, PrimeQ@ # &]]; Map[a, Range[2, r]]]; nn = 10^4; t = f[3, nn]; Table[1 + First@ Flatten@ Position[BitXor[t, f[Prime@ n, nn]], 0], {n, 2, 37}] (* Michael De Vlieger, Sep 13 2016, after Peter J. C. Moses at A159559 *)

CROSSREFS

Cf. A159559, A159698.

Sequence in context: A042927 A292533 A140305 * A142346 A106980 A089682

Adjacent sequences:  A229016 A229017 A229018 * A229020 A229021 A229022

KEYWORD

nonn

AUTHOR

Vladimir Shevelev, Sep 11 2013

EXTENSIONS

More terms from Alois P. Heinz, Sep 15 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 January 18 01:05 EST 2020. Contains 330995 sequences. (Running on oeis4.)