OFFSET
1,1
COMMENTS
This generates a monotonically increasing sequence, nicely spread out, likely infinite. By altering the starting prime value, a family of such sequences can easily be generated.
From the first 155 points, with x = #digits, y = sequence pointer y~ A*x^B with (A, B) = (0.6624, 0.8106). This indicates a 100-digit prime in the vicinity of y = 28 for example. - Bill McEachen, Apr 13 2014
Only from the first 100 entries, it would appear that an upper bound on the number of digits in a(n) is A092777(n). - Bill McEachen, Sep 15 2015
LINKS
Bill McEachen, Table of n, a(n) for n = 1..100
EXAMPLE
Begin from 2.
Next we try 23 - it is prime, this sets next iteration (23 is the "constant" part), upon which we try higher primes.
Next we try 235 - composite; next we try 237 - composite; next we try 2311 - prime, this sets next iteration (2311 now becomes the "constant" part), upon which we try higher primes.
Next we try 231113 - composite; next we try 231117 - composite; ...; next we try 231131 - prime, this sets next iteration (231131 now becomes the "constant" part), upon which we try higher primes.
Next we try 23113147 - prime, this sets next iteration (23113147 now becomes the "constant" part), upon which we try higher primes.
MAPLE
X:= 2: p:= 3: a[1]:= 2:
for i from 2 to 30 do
while not isprime(X*10^(1+ilog10(p))+p) do
p:= nextprime(p)
od:
X:= X*10^(1+ilog10(p))+p;
a[i]:= X;
p:= nextprime(p);
od:
seq(a[i], i=1..30); # Robert Israel, Sep 15 2015
MATHEMATICA
s[1] = 2; s[n_] := s[n] = Block[{d = Flatten[IntegerDigits /@ Array[s, n-1]], p = NextPrime@s[n - 1]}, While[! PrimeQ@ FromDigits@ Join[d, IntegerDigits@p], p = NextPrime@p]; p]; a[n_] := FromDigits@ Flatten[ IntegerDigits /@ Array[s, n]]; Array[a, 10] (* Giovanni Resta, Apr 09 2014 *)
PROG
(PARI) print1(N=2); p=3; for(n=2, 10, while(!isprime(eval(Str(N, p))), p=nextprime(p+1)); N=eval(Str(N, p)); p=nextprime(p+1); print1(", "N)) \\ Charles R Greathouse IV, Apr 09 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bill McEachen, Apr 07 2014
EXTENSIONS
a(7)-a(13) from Giovanni Resta, Apr 09 2014
STATUS
approved