%I #8 May 01 2024 12:36:41
%S 0,2,4,6,8,10,12,14,16,18,2,4,6,8,10,12,14,16,18,20,1,5,9,13,17,21,25,
%T 29,33,37,3,7,11,15,19,23,27,31,35,39,3,11,19,27,35,43,51,59,67,75,5,
%U 13,21,29,37,45,53,61,69,77,7,23,39,55,71,87,103,119,135,151,9,25,41,57,73
%N Table T(n,n) read by rows: T(1,1)=0; then if n even T(n,1)=T(n-1,1)+2 and if n odd T(n,1)=T(n-2,1)+T(n-1,1)-1 then T(n,j)=T(n,j-1) + 2^floor((n+1)/2).
%C Integers > 1 appear exactly twice, 0 and 1 only once. Consecutive primes with gap 4 are consecutive in rows 3 or 4
%C The sequence contains the first 10 elements of row n=1, then the first 10 elements of row n=2, then the first 10 elements of row n=3 etc. The array is not read in full, not by diagonals and not as a lower or upper triangle. - _R. J. Mathar_, May 01 2024
%e 0 2 4 6 8 10 12 14 16 18
%e 2 4 6 8 10 12 14 16 18 20
%e 1 5 9 13 17 21 25 29 33 37
%e 3 7 11 15 19 23 27 31 35 39
%e 3 11 19 27 35 43 51 59 67 75
%e 5 13 21 29 37 45 53 61 69 77
%e 7 23 39 55 71 87 103 119 135 151
%e 9 25 41 57 73 89 105 121 137 153
%e 15 47 79 111 143 175 207 239 271 303
%e 17 49 81 113 145 177 209 241 273 305
%e 31 95 159 223 287 351 415 479 543 607
%e 33 97 161 225 289 353 417 481 545 609
%e 63 191 319 447 575 703 831 959 1087 1215
%e 65 193 321 449 577 705 833 961 1089 1217
%e 127 383 639 895 1151 1407 1663 1919 2175 2431
%e 129 385 641 897 1153 1409 1665 1921 2177 2433
%e 255 767 1279 1791 2303 2815 3327 3839 4351 4863
%e 257 769 1281 1793 2305 2817 3329 3841 4353 4865
%p A097586 := proc(n,k)
%p if n < 1 then
%p 0 ;
%p elif k < 1 then
%p 0 ;
%p elif k = 1 then
%p if n = 1 then
%p 0;
%p elif type(n,'even') then
%p procname(n-1,1)+2 ;
%p else
%p procname(n-2,1)+procname(n-1,1)-1 ;
%p end if;
%p else
%p procname(n,k-1)+2^floor((n+1)/2) ;
%p end if;
%p end proc:
%p for n from 1 to 18 do
%p for k from 1 to 10 do
%p printf("%5d ",A097586(n,k)) ;
%p end do:
%p printf("\n") ;
%p end do: # _R. J. Mathar_, May 01 2024
%K nonn,less
%O 1,2
%A _Pierre CAMI_, Sep 20 2004