|
|
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
|
|
|
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:
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|