

A068166


Define an increasing sequence as follows. Given the first term, called the seed (which need not share the property of the remaining terms), subsequent terms are obtained by inserting at least one digit in the previous term so as to obtain the smallest number with the specified property. This is the prime sequence with the seed a(1) = 1.


10



1, 11, 101, 1013, 10103, 100103, 1001003, 10010023, 100010023, 1000100239, 10001000239, 100010002039, 1000100020319, 10001000200319, 100001000200319, 1000010002000319, 10000100002000319, 100001000020003109, 1000010000200031039, 10000100002000310329
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..300


EXAMPLE

The primes obtained by inserting/placing a digit in a(2) = 11 are 101, 113, 131, 181, 191, 211, 311, etc. and the smallest is 101, hence a(3) = 101.


MAPLE

with(numtheory): P:=proc(q, h) local a, b, c, d, j, k, n; a:=h; print(a);
for n from 1 to q do b:=10^100; d:=0;
for j from 0 to 9 do for k from 0 to ilog10(a)+1 do
if k=0 then c:=10*a+j; else if (a mod 10^k)>0 then
c:=trunc(a/10^(k))*10^(k+1)+j*10^(ilog10(a mod 10^k)+1)+(a mod 10^k);
fi; fi; if c>a then if sigma(c)<b then b:=sigma(c); d:=c;
fi; fi; od; od; a:=d; print(a); od; end: P(30, 1); # Paolo P. Lava, Nov 07 2014


CROSSREFS

Cf. A068167.
Sequence in context: A289466 A289532 A288826 * A199306 A282958 A283061
Adjacent sequences: A068163 A068164 A068165 * A068167 A068168 A068169


KEYWORD

base,nonn


AUTHOR

Amarnath Murthy, Feb 25 2002


EXTENSIONS

Corrected and extended by Robert Gerbicz, Sep 06 2002


STATUS

approved



