A232972 Main diagonal of array P(i,j) mentioned in A064642.
1, 5, 46, 497, 5746, 68948, 846889, 10570001
Offset: 0
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.
The array begins 1 1 2 1 5 7 1 8 22 29 G.f. = 1 + 2*x + 7*x^3 + 29*x^4 + 133*x^5 + 650*x^6 + 3319*x^7 + ...
A:= series( (1-x-sqrt(1-6*x-3*x^2)) / (2*x*(1+x)),x, 21): seq(coeff(A,x,i), i=0..20); # Brian Drake, Aug 01 2007
Table[SeriesCoefficient[(1-x-Sqrt[1-6*x-3*x^2])/(2*x*(1+x)),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 13 2012 *)
a(n):=sum(binomial(n+i,n)*sum(binomial(j,-n+2*j-i-2)*binomial(n+1,j),j,0,n+1),i,0,n)/(n+1); /* Vladimir Kruchinin, May 12 2011 */
a(n)=if(n<0,0,polcoeff(serreverse(x*(1-x)/(1+x+x^2)+O(x^(n+2))),n+1)) /* Paul Barry */
The array begins: i/j| 0 1 2 3 4 5 6 7 8 ------------------------------------------------------------- 0 | 1 2 11 72 543 4403 37527 331072 2997466 ... 1 | 1 6 39 293 2364 20072 176609 1595909 ... 2 | 2 15 119 976 8373 74150 673156 ... 3 | 4 37 330 2944 26683 246035 ... 4 | 8 88 870 8334 79534 ... 5 | 16 204 2209 22579 ... 6 | 32 464 5454 ... 7 | 64 1040 ... 8 |128 ... ... For example, when we get to the antidiagonal that reads 4, 15, 39, ..., the reason for the 39 is that from that cell we can see one cell that has been filled in above it (containing 11), one cell to the northwest (2), two cells to the west (1, 6), and two to the southwest (4, 15), for a total of a(8) = 39. The next pair of duplicates greater than 2 is 2^20 = 1048576 = a(154) = a(231), located in antidiagonals 17 = A233328(2) and 21, respectively. For additional duplicate numbers in this sequence see A335903. - _Hartmut F. W. Hoft_, Jun 29 2020
s[0, 0] = 1; s[i_, j_] := s[i, j] = Sum[s[k, j], {k, 0, i-1}] + Sum[s[i, k], {k, 0, j-1}] + Sum[s[i+j-k, k], {k, 0, j-1}] + Sum[s[i-k-1, j-k-1], {k, 0, Min[i, j] - 1}] aDiag[m_] := Map[s[m-#, #]&, Range[0, m]] a279212[n_] := Flatten[Map[aDiag, Range[0, n]]] a279212[9] (* data - 10 antidiagonals; Hartmut F. W. Hoft, Jun 29 2020 *)
Illustration of initial terms as a spiral: . . 22 - 19 - 14 . / \ . 29 3 - 2 12 . / / \ \ . 33 4 1 - 1 9 . \ \ / . 42 5 - 7 - 8 . \ . 47 - 59 - 74 . a(16) = 47 because the sum of its two neighbors is 42 + 5 = 47. a(17) = 59 because the sum of its three neighbors is 47 + 5 + 7 = 59. a(18) = 74 because the sum of its three neighbors is 59 + 7 + 8 = 74. a(19) = 82 because the sum of its two neighbors is 74 + 8 = 82.
A278181[0] = A278181[1] = 1; A278181[n_] := A278181[n] = With[{lev = Ceiling[1/6 (-3 + Sqrt[3] Sqrt[3 + 4 n])]}, With[{pos = 3 lev (lev - 1) + (n - 3 lev (1 + lev))/lev*(lev - 1)}, A278181[n - 1] + A278181[Ceiling[pos]] + If[Mod[n, lev] == 0 || n - 3 lev (lev - 1) == 1, 0, A278181[Floor[pos]]] + If[3 lev (1 + lev) == n, A278181[n - 6 lev + 1], 0]]]; Array[A278181, 61, 0] (* JungHwan Min, Nov 21 2016 *)
A107783 := proc(n,k) option remember ; if n < 0 or k < 0 or k > n then 0 ; elif n =0 then 1; elif n mod 2 = 1 then if n = k then 1; else A107783(n,k+1)+A107783(n-1,k-1)+A107783(n-1,k)+A107783(n-2,k-1) ; fi ; else if k = 0 then 1; else A107783(n,k-1)+A107783(n-1,k-1)+A107783(n-1,k)+A107783(n-2,k-1) ; fi ; fi ; end: for n from 0 to 11 do if ( n mod 2 ) = 1 then kstrt := n ; else kstrt := 0 ; fi ; kend := n-kstrt : for k from kstrt to kend by sign(kend-kstrt) do printf("%d,",A107783(n,k)) ; od: od: # R. J. Mathar, Aug 13 2007
Comments