Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Where n appears in A082224, provided A082224 is read as a sequence rather than as an array.
0

%I #17 Feb 26 2021 05:00:22

%S 1,2,3,4,11,7,10,5,22,6,37,8,21,14,9,17,55,13,56,16,36,15,78,12,79,20,

%T 105,19,106,18,136,35,137,26,172,24,171,25,211,23,210,28,253,27,254,

%U 29,300,31,301,34,351,30,352,32,407,39,406,38,465,33,466,43,529,40,528,41

%N Where n appears in A082224, provided A082224 is read as a sequence rather than as an array.

%C Conjecture: Sequence is a permutation of the positive integers.

%e A082224(11) = 5, hence a(5) = 11.

%o (PARI) lista(nn) = { A=matrix(nn, nn); my(b=vector(nn^2)); S=Set(); for(s=2, nn+1, for(i=1, s-1, if(s%2, q=[i, s-i], q=[s-i, i]); p=[sum(j=1, q[2]-1, A[q[1], j]), sum(j=1, q[1]-1, A[j, q[2]])]; n=1; while(setsearch(S, n) || (p[1]&&!isprime(p[1]+n)) || (p[2]&&isprime(p[2]+n)), n++); A[q[1], q[2]]=n; S=setunion(S, Set([n])); mm=(q[1]+q[2]-1)*(q[1]+q[2]-2)/2 + q[2]*(1 + (-1)^(q[1]+q[2]))/2 + q[1]*(1 - (-1)^(q[1]+q[2]))/2; b[n]=mm; )); for(ii=1, nn^2, if (b[ii], print1(b[ii], ", "), break)); } \\ If the desired a(n) does not appear in the output, then one needs to increase the value of nn in lista(nn) until a(n) appears. This program is a modification of the PARI program by _Max Alekseyev_ in A082228. - _Petros Hadjicostas_, Feb 25 2021

%Y Cf. A082224, A082228.

%K nonn

%O 1,2

%A _Klaus Brockhaus_, Mar 09 2006