A081274 Duplicate of A038764.
1, 7, 22, 46, 79, 121, 172, 232, 301, 379, 466, 562, 667, 781, 904, 1036, 1177, 1327
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.
Square array begins as: 1, 1, 1, 1, 1, ... A000012; 1, 4, 7, 10, 13, ... A016777; 1, 7, 22, 46, 79, ... A038764; 1, 10, 46, 136, 307, ... A081583; 1, 13, 79, 307, 886, ... A081584; From _Roger L. Bagula_, Dec 09 2008: (Start) As a triangle this begins: 1; 1, 1; 1, 4, 1; 1, 7, 7, 1; 1, 10, 22, 10, 1; 1, 13, 46, 46, 13, 1; 1, 16, 79, 136, 79, 16, 1; 1, 19, 121, 307, 307, 121, 19, 1; 1, 22, 172, 586, 886, 586, 172, 22, 1; 1, 25, 232, 1000, 2086, 2086, 1000, 232, 25, 1; 1, 28, 301, 1576, 4258, 5944, 4258, 1576, 301, 28, 1; (End)
a081577 n k = a081577_tabl !! n !! k a081577_row n = a081577_tabl !! n a081577_tabl = map fst $ iterate (\(us, vs) -> (vs, zipWith (+) (map (* 2) ([0] ++ us ++ [0])) $ zipWith (+) ([0] ++ vs) (vs ++ [0]))) ([1], [1, 1]) -- Reinhard Zumkeller, Mar 16 2014
A081577:= func< n,k | (&+[Binomial(k,j)*Binomial(n-j,k)*2^j: j in [0..n-k]]) >; [A081577(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 25 2021
a[0]={1}; a[1]={1, 1}; a[n_]:= a[n]= 2*Join[{0}, a[n-2], {0}] + Join[{0}, a[n-1]] + Join[a[n-1], {0}]; Table[a[n], {n,0,10}]//Flatten (* Roger L. Bagula, Dec 09 2008 *) Table[Hypergeometric2F1[-k, k-n, 1, 3], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, May 24 2013 *)
flatten([[hypergeometric([-k, k-n], [1], 3).simplify() for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 25 2021
The first such self-conjugate partitions, corresponding to a(n)=1,2,3,4 are 3+3+3, 6+6+6+3+3+3, 9+9+9+6+6+6+3+3+3, 12+12+12+9+9+9+6+6+6+3+3+3. - _Augustine O. Munagi_, Dec 18 2008
[9*n*(n+1)/2: n in [0..50]]; // Vincenzo Librandi, Dec 29 2012
[seq(9*binomial(n+1,2), n=0..50)]; # Zerinvary Lajos, Nov 24 2006
Table[(9/2)*n*(n+1), {n,0,50}] (* G. C. Greubel, Aug 22 2017 *)
a(n)=9*n*(n+1)/2
[9*binomial(n+1, 2) for n in (0..50)] # G. C. Greubel, May 20 2021
f6:=proc(n) if n=0 then 1 elif (n mod 2) = 0 then 9*n-6 else 9*n-3; fi; end; [seq(f6(n),n=0..80)];
Join[{1}, LinearRecurrence[{1, 1, -1}, {6, 12, 24}, 62]] (* Jean-François Alcover, Apr 23 2018 *)
Vec((1 + 5*x + 5*x^2 + 7*x^3) / ((1 - x)^2*(1 + x)) + O(x^60)) \\ Colin Barker, Jan 25 2018
apply( {A298033(n)=if(n,n*3\/2*6-6,1)}, [0..66]) \\ M. F. Hasler, Jan 11 2022
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 */
List([0..50],n->(9*n^2-3*n+2)/2); # Muniru A Asiru, Nov 02 2018
[(9*n^2 - 3*n +2)/2: n in [0..50]]; // G. C. Greubel, Nov 02 2018
seq((9*n^2-3*n+2)/2,n=0..50); # Muniru A Asiru, Nov 02 2018
s = 1; lst = {s}; Do[s += n + 2; AppendTo[lst, s], {n, 1, 500, 9}]; lst (* Zerinvary Lajos, Jul 11 2009 *) Table[(9n^2-3n+2)/2,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1}, {1,4,16}, 50] (* Harvey P. Dale, Jul 24 2013 *)
a(n)=binomial(3*n,2)+1 \\ Charles R Greathouse IV, Oct 07 2015
Right triangular spiral begins: 56 55 57 54 29 58 53 28 30 59 52 27 11 31 60 51 26 10 12 32 61 50 25 9 2 13 33 62 49 24 8 1 3 14 34 63 48 23 7 6 5 4 15 35 64 47 22 21 20 19 18 17 16 36 65 46 45 44 43 42 41 40 39 38 37 66 78 77 76 75 74 73 72 71 70 69 68 67 The eight nearest neighbors of 3 are 1, 2, 13, 33, 14, 4, 5, 6. Their sum is a(3)=78.
SIZE=29 # must be odd grid = [0] * (SIZE*SIZE) saveX = [0]* (SIZE*SIZE) saveY = [0]* (SIZE*SIZE) saveX[1] = saveY[1] = posX = posY = SIZE//2 grid[posY*SIZE+posX]=1 n = 2 def walk(stepX,stepY,chkX,chkY): global posX, posY, n while 1: posX+=stepX posY+=stepY grid[posY*SIZE+posX]=n saveX[n]=posX saveY[n]=posY n+=1 if posY==0 or grid[(posY+chkY)*SIZE+posX+chkX]==0: return while 1: walk(0, -1, 1, 1) # up if posY==0: break walk( 1, 1, -1, 0) # right-down walk(-1, 0, 0, -1) # left for n in range(1,92): posX = saveX[n] posY = saveY[n] k = grid[(posY-1)*SIZE+posX] + grid[(posY+1)*SIZE+posX] k+= grid[(posY-1)*SIZE+posX-1] + grid[(posY-1)*SIZE+posX+1] k+= grid[(posY+1)*SIZE+posX-1] + grid[(posY+1)*SIZE+posX+1] k+= grid[posY*SIZE+posX-1] + grid[posY*SIZE+posX+1] print(k, end=', ')
Triangle begins (rows indexed by n >= 0 and columns by k >= 0): 1; 1, 1; 1, 2, 1; 1, 5, 7, 3; 1, 8, 22, 24, 9; 1, 11, 46, 90, 81, 27; 1, 14, 79, 228, 351, 270, 81; 1, 17, 121, 465, 1035, 1323, 891, 243; 1, 20, 172, 828, 2430, 4428, 4860, 2916, 729; ...
## The following Maple program gives the Taylor expansion of the bivariate g.f. of T(n,k) in powers of x: T := proc (x, y) 1+x*(y+1)+x^2*(y+1)^2/(1-x-3*y*x) end proc; expand(taylor(T(x, y), x = 0, 20)); ## Petros Hadjicostas, May 27 2019
T[n_, 0]:= 1; T[n_, k_]:= If[k<0 || k>n, 0, If[n==1 && k==1, 1, If[n==2 && k==1, 2, If[k==n && n>=2, 3^(n-2), 3*T[n-1, k-1] + T[n-1, k]]]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, May 30 2019 *)
T(n,k)=if(n<0||k<0||k>n,0,if(n<3,[[1],[1,1],[1,2,1]][n+1][k+1],3*T(n-1,k-1)+T(n-1,k))) \\ Ralf Stephan, Jan 25 2005
def T(n, k): if (k<0 and k>n): return 0 elif (k==0): return 1 elif (n==k==1): return 1 elif (n==2 and k==1): return 2 elif (n>=2 and k==n): return 3^(n-2) else: return 3*T(n-1, k-1) + T(n-1, k) [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, May 30 2019
[(6*n*(3*n+4)+(-1)^n+7)/8: n in [0..60]]; // Vincenzo Librandi, Oct 26 2011
aa = {}; Do[i = 0; Do[Do[Do[If[x + y == z, i = i + 1], {x, y + 1, 3 n}], {y, 1, 3 n}], {z, 1, 3 n}]; AppendTo[aa, i], {n, 1, 20}]; aa (* Artur Jasinski, Feb 09 2010 *)
a(n)=(6*n*(3*n+4)+(-1)^n+7)/8 \\ Charles R Greathouse IV, Apr 16 2020
[3*n*(3*n+7)/2+4: n in [0..50]];
Table[3 n (3 n + 7)/2 + 4, {n, 0, 50}] LinearRecurrence[{3,-3,1},{4,19,43},50] (* Harvey P. Dale, Mar 02 2019 *)
makelist(3*n*(3*n+7)/2+4, n, 0, 50);
a(n) = 3*n*(3*n + 7)/2 + 4; \\ Indranil Ghosh, Mar 24 2017
[3*n*(3*n+7)/2+4 for n in range(50)]
[3*n*(3*n+7)/2+4 for n in range(50)]
Comments