cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A097586 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).

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