[seqfan] Re: a(a(n) + n) is prime

M. F. Hasler oeis at hasler.fr
Tue Oct 8 20:31:01 CEST 2013


I get a(7)=6...

{u=0;a=vector(1000);for(i=1,#a,a[i]>0&next;for(x=1,9e9,(!a[i]||isprime(x))&!bittest(u,x)&(a[i]=x)&break);u+=1<<a[i];i+a[i]<=#a
& a[i+a[i]]=-1);vecextract(a,"..100")}

= [1, 2, 3, 5, 4, 7, 6, 8, 11, 9, 10, 12, 13, 14, 15, 17, 16, 18, 19, 23,
29, 20, 21, 31, 22, 37, 24, 41, 25, 43, 26, 27, 47, 28, 30, 53, 32, 59, 33,
34, 35, 61, 67, 71, 36, 38, 73, 39, 40, 79, 83, 42, 44, 89, 97, 45, 101,
46, 103, 48, 49, 107, 109, 50, 113, 51, 52, 54, 127, 55, 56, 131, 137, 139,
57, 149, 58, 60, 62, 151, 157, 63, 64, 163, 65, 66, 167, 68, 173, 69, 70,
72, 74, 179, 75, 76, 181, 77, 78, 80]

Indeed, primes (as well as composites) appear in natural order, by
construction.

Maximilian

On Tue, Oct 8, 2013 at 8:23 AM, Eric Angelini <Eric.Angelini at kntv.be> wrote:

> Hello SeqFans,
> am I wrong or this seq is not in the OEIS yet?
>
> S =
> 1,2,3,5,4,7,8,6,11,9,10,12,13,17,19,14,15,16,23,29,31,18,20,37,21,41,22,24,25,43,47,53,26,59,...
>
> S is build with those rules:
>      . a(1)=1
>      . a(a(n)+n) is prime
>      . S is extended with the smallest integer not yet in S and not
> leading to a contradiction.
>
> We see here, that:
> a(1)+1 -> 1+1=2 -> a(2) which is prime [2]
> a(2)+2 -> 2+2=4 -> a(4) which is prime [5]
> a(3)+3 -> 3+3=6 -> a(6) which is prime [7]
> a(4)+4 -> 5+4=9 -> a(9) which is prime [11]
> a(5)+5 -> 4+5=9 -> a(9) which is prime [11]
> a(6)+6 -> 7+6=13 -> a(13) which is prime [13]
> a(7)+7 -> 8+7=15 -> a(15) which is prime [19]
> a(8)+8 -> 6+8=14 -> a(14) which is prime [17]
> a(9)+9 -> 11+9=20 -> a(20) which is prime [29]
> ...
>
> n = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
> 27 28 29 30 31 32 33 34
> S =
> 1,2,3,5,4,7,8,6,11,9,10,12,13,17,19,14,15,16,23,29,31,18,20,37,21,41,22,24,25,43,47,53,26,59,...
> sum 2 4 6 9 9 1 1 1  2 1 21 24 26 31 34 30 32 ...
>               3 5 4  0 9
>
> I guess S is a permutation of the Naturals.
> Primes appear in S in their natural order.
> Best,
> É.
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>



More information about the SeqFan mailing list