cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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
Offset: 2

Views

Author

Vladimir Shevelev, Sep 11 2013

Keywords

Comments

All positive terms of the sequence are prime.
Conjecture: all terms are positive.

Examples

			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.
		

Crossrefs

Programs

  • 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 *)

Extensions

More terms from Alois P. Heinz, Sep 15 2013