login
a(n) is the length of the n-th chunk of nonprimes in this sequence, the chunks being separated by primes; lexicographically least such sequence (starting with a nonprime).
2

%I #11 Jan 02 2023 12:30:49

%S 1,2,4,6,3,8,9,10,12,5,14,15,16,18,20,21,7,22,24,25,11,26,27,28,30,32,

%T 33,34,35,13,36,38,39,40,42,44,45,46,48,17,49,50,51,52,54,55,56,57,58,

%U 60,19,62,63,64,65,66,68,69,70,72,74,75,76,23,77,78,80,81

%N a(n) is the length of the n-th chunk of nonprimes in this sequence, the chunks being separated by primes; lexicographically least such sequence (starting with a nonprime).

%C This is a permutation of the positive integers. See A232805 for the variant starting with a prime.

%H M. F. Hasler, in reply to E. Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2013-November/012029.html">Self-describing chunks of primes</a>, SeqFan list, Nov 30 2013

%o (PARI) {N -> my(a=[1],c=1,i=1,p=1); while(#a<N, a=concat(a,p=nextprime(p+1));for(j=1,a[i++], while(isprime(c++),); a=concat(a,c));a}

%K nonn

%O 1,2

%A _M. F. Hasler_, Nov 30 2013