Concatenate [integer, first difference]

to form a prime number

Hello SeqFans,

Three thingies:

Let:

a(1) = 1

a = a(n)

b = a(n+1)

b > a

d = b-a

[t,u,...,z] = the concatenation of the strings 't' and 'u' and ... and 'z'

Now build S(1) where b is the smallest integer such that [a,d] is prime

... build S(2) where b is the smallest integer such that [d,b] is prime

... build S(3) where b is the smallest integer such that [a,d,b] is prime

Are the herunder starts correct?

S(1) = 1, 2, 5, 8, 11, 14, 23, 26, 29, 32,  49, ...

d =   1  3  3  3   3   9   3   3   3   17

p =  11,23,53,83,113,149,233,263,293,3217,

S(2) = 1, 3, 7, 9, 11, 17, 21, 23,  33,  47, 53, ...

d =   2  4  2  2   6   4   2   10   14   6

p =   23,47,29,211,617,421,223,1033,1447,653,

S(3) = 1,  7,   11,   13,   17,   23,   29,   31,  41, ...

d =   6    4    2     4     6     6      2    10

p =  167,7411,11213,13417,17623,23629,29231,311041,

Best,

É.

__________

[Alois Heinz]:

Dear Eric,

nice new sequences you have, here are the programs...

S1:= proc(n) option remember;

local a, d;

if n=1 then 1

else a:= S1(n-1);

for d while not isprime (parse(cat(a,d)))

do od;

a+d

fi

end:

seq (S1(n), n=1..60);

S1 = 1, 2, 5, 8, 11, 14, 23, 26, 29, 32, 49, 50, 53, 76, 77, 80, 89, 112, 115, 116, 119, 122, 125, 134, 145, 146, 167, 196, 257, 266, 269, 272, 281, 290, 293, 302, 305, 322, 323, 344, 353, 356, 373, 376, 377, 386, 389, 406, 433, 440, 449, 452, 455, 478, 481, 484, 497, 500, 503, 512, ...

__________

S2:= proc(n) option remember;

local a, d;

if n=1 then 1

else a:= S2(n-1);

for d while not isprime (parse(cat(d,a+d)))

do od;

a+d

fi

end:

seq (S2(n), n=1..60);

S2 = 1, 3, 7, 9, 11, 17, 21, 23, 33, 47, 53, 57, 61, 63, 67, 69, 71, 77, 83, 87, 91, 93, 101, 111, 113, 131, 141, 143, 1007, 1011, 1013, 1017, 1019, 1023, 1031, 1047, 1051, 1057, 1059, 1061, 1083, 1127, 1131, 1141, 1143, 1157, 1161, 1163, 1169, 1181, 1199, 1203, 1229, 1233, 10027, 10039, 10051, 10053, 10097, 10131, ...

__________

S3:= proc(n) option remember;

local a, d;

if n=1 then 1

else a:= S3(n-1);

for d while not isprime (parse(cat(a,d,a+d)))

do od;

a+d

fi

end:

seq (S3(n), n=1..60);

S3 = 1, 7, 11, 13, 17, 23, 29, 31, 41, 43, 49, 59, 71, 79, 91, 1019, 1033, 1073, 1087, 1091, 1093, 1127, 1139, 1163, 1169, 1187, 1193, 1219, 1223, 1237, 1243, 1259, 1301, 1307, 1337, 1339, 1349, 1373, 1403, 1433, 1483, 1489, 1493, 1501, 1547, 1549, 1567, 1577, 1579, 1601, 1631, 1633, 1657, 1661, 1673, 1679, 11683, 11789, 11903, 11911, ...

Best, Alois

__________

... many thanks, Alois, beautiful!

É.

__________

S1 is now http://oeis.org/A173698