login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099965 First column (also row sums) of triangle in A099964. 4

%I #18 Aug 03 2021 19:05:00

%S 1,1,1,2,3,8,17,39,126,352,1026,2943,11429,39138,138903,486490,

%T 1711141,7720713,31383260,131236182,543056039,2254646235,9349845765,

%U 48137959377,226341090088,1090094720010,5203693239201,24909594299924

%N First column (also row sums) of triangle in A099964.

%H Reinhard Zumkeller, <a href="/A099965/b099965.txt">Table of n, a(n) for n = 0..750</a>

%p with(linalg):rev:=proc(a) local n, p; n:=vectdim(a): p:=i->a[n+1-i]: vector(n,p) end: ps:=proc(a) local n, q; n:=vectdim(a): q:=i->sum(a[j],j=1..i): vector(n,q) end: pss:=proc(a) local n, q; n:=vectdim(a): q:=proc(i) if i<=n then sum(a[j],j=1..i) else sum(a[j],j=1..n) fi end: vector(n+1,q) end: tr:={seq(n*(n+1)/2,n=1..30)}: R[0]:=vector(1,1): for n from 1 to 31 do if member(n,tr)=false then R[n]:=ps(rev(R[n-1])) else R[n]:=pss(rev(R[n-1])) fi od: seq(R[n][1],n=0..31); # _Emeric Deutsch_, Nov 16 2004

%t triQ[n_] := Reduce[n == k (k + 1)/2, k, Integers] =!= False; row[0] = {1}; row[1] = {1, 1}; row[n_] := row[n] = (ro = Accumulate[Reverse[row[n-1]]]; If[triQ[n], Append[ro, Last[ro]], ro]); Table[row[n][[1]], {n, 0, 27}] (* _Jean-François Alcover_, Feb 10 2018 *)

%o (Haskell)

%o a099965 = flip a099964 0

%o a099965_list = map head a099964_tabf

%o -- _Reinhard Zumkeller_, May 02 2012

%Y Cf. A099964.

%K nonn,easy

%O 0,4

%A _N. J. A. Sloane_, Nov 13 2004

%E More terms from _Emeric Deutsch_, Nov 16 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 19:27 EDT 2024. Contains 372004 sequences. (Running on oeis4.)